From a090be2d09527271acc661edd9179412807f8aa4 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 4 Jul 2024 01:36:23 +0900 Subject: [PATCH 001/204] Upgrade `@samchon/openapi` dependency. --- benchmark/package.json | 2 +- package.json | 2 +- packages/core/package.json | 12 ++++++------ packages/e2e/package.json | 2 +- packages/fetcher/package.json | 4 ++-- packages/migrate/package.json | 12 ++++++------ packages/sdk/package.json | 12 ++++++------ test/features/all/swagger.json | 2 +- .../swagger.json | 2 +- .../app-globalPrefix-versionUri/swagger.json | 2 +- test/features/app-globalPrefix/swagger.json | 2 +- test/features/app-routerModule/swagger.json | 2 +- test/features/app-versionHeader/swagger.json | 2 +- test/features/app-versionUri/swagger.json | 2 +- test/features/app/swagger.json | 2 +- .../distribute-assert-json/packages/api/package.json | 2 +- .../distribute-assert/packages/api/package.json | 2 +- .../distribute-json/packages/api/package.json | 2 +- test/features/distribute/packages/api/package.json | 2 +- test/package.json | 12 ++++++------ website/package-lock.json | 10 +++++----- website/package.json | 4 ++-- website/pages/docs/sdk/sdk.mdx | 4 ++-- 23 files changed, 50 insertions(+), 50 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index a92529b66..129b387bf 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -41,7 +41,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.3.1" + "typia": "^6.4.0" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/package.json b/package.json index 390dc9459..7f3493870 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.4.0", + "version": "3.4.1", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index a7564f1ae..714c03605 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.4.0", + "version": "3.4.1", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,10 +36,10 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.0", + "@nestia/fetcher": "^3.4.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "detect-ts-node": "^1.0.5", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.3.1", + "typia": "^6.4.0", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.0", + "@nestia/fetcher": ">=3.4.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.3.1 <7.0.0" + "typia": ">=6.4.0 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 78844d2ba..35e6c3c1e 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -38,7 +38,7 @@ "ts-node": "^10.9.1", "ts-patch": "^3.2.1", "typescript": "^5.5.2", - "typia": "^6.3.1" + "typia": "^6.4.0" }, "dependencies": { "@nestia/fetcher": "^3.2.2", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 846ec66b7..195628995 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.4.0", + "version": "3.4.1", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -43,6 +43,6 @@ "src" ], "dependencies": { - "@samchon/openapi": "^0.2.2" + "@samchon/openapi": "^0.3.0" } } \ No newline at end of file diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 187fdff75..535c6dc0a 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/migrate", - "version": "0.14.0", + "version": "0.14.1", "description": "Migration program from swagger to NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,9 +36,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/core": "^3.3.2", + "@nestia/core": "^3.4.1", "@nestia/e2e": "^0.6.0", - "@nestia/fetcher": "^3.3.2", + "@nestia/fetcher": "^3.4.1", "@nestjs/common": "^10.3.8", "@nestjs/core": "^10.3.8", "@nestjs/platform-express": "^10.3.8", @@ -63,13 +63,13 @@ "typescript-transform-paths": "^3.4.6" }, "dependencies": { - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", "tstl": "^3.0.0", - "typescript": "^5.5.2", - "typia": "^6.3.1" + "typescript": "^5.5.3", + "typia": "^6.4.0" }, "files": [ "lib", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 36829ab6a..f367b28c3 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.4.0", + "version": "3.4.1", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.0", - "@samchon/openapi": "^0.2.2", + "@nestia/fetcher": "^3.4.1", + "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -43,15 +43,15 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.3.1" + "typia": "^6.4.0" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.0", + "@nestia/fetcher": ">=3.4.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.3.1 <7.0.0" + "typia": ">=6.4.0 <7.0.0" }, "devDependencies": { "@nestia/e2e": "^0.4.3", diff --git a/test/features/all/swagger.json b/test/features/all/swagger.json index e4a811d10..3543093ad 100644 --- a/test/features/all/swagger.json +++ b/test/features/all/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.1-dev.20240703", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json index 1b1276bc7..736ff3e40 100644 --- a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json +++ b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix-versionUri/swagger.json b/test/features/app-globalPrefix-versionUri/swagger.json index 554f0a3d8..e161ca81f 100644 --- a/test/features/app-globalPrefix-versionUri/swagger.json +++ b/test/features/app-globalPrefix-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix/swagger.json b/test/features/app-globalPrefix/swagger.json index 444f70633..10f911807 100644 --- a/test/features/app-globalPrefix/swagger.json +++ b/test/features/app-globalPrefix/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-routerModule/swagger.json b/test/features/app-routerModule/swagger.json index eaa70c106..4749bc885 100644 --- a/test/features/app-routerModule/swagger.json +++ b/test/features/app-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionHeader/swagger.json b/test/features/app-versionHeader/swagger.json index 4e598678f..2f17d3fa2 100644 --- a/test/features/app-versionHeader/swagger.json +++ b/test/features/app-versionHeader/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionUri/swagger.json b/test/features/app-versionUri/swagger.json index f6639c7e5..ead36d214 100644 --- a/test/features/app-versionUri/swagger.json +++ b/test/features/app-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app/swagger.json b/test/features/app/swagger.json index 198653b8d..6933c9b16 100644 --- a/test/features/app/swagger.json +++ b/test/features/app/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 1f7d9eb64..fc2a04b70 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.3.2", - "typia": "^6.3.1" + "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 1f7d9eb64..fc2a04b70 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.3.2", - "typia": "^6.3.1" + "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 1f7d9eb64..fc2a04b70 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.3.2", - "typia": "^6.3.1" + "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 1f7d9eb64..fc2a04b70 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.3.2", - "typia": "^6.3.1" + "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 4c16ae58a..e68b92e7e 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/test", - "version": "3.4.0", + "version": "3.4.1", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,9 +26,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.4.0", + "@nestia/sdk": "^3.4.1", "@nestjs/swagger": "^7.1.2", - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", "@types/node": "20.11.16", "@types/uuid": "^9.0.8", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.4.0", + "@nestia/core": "^3.4.1", "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.4.0", + "@nestia/fetcher": "^3.4.1", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.3.1", + "typia": "^6.4.0", "uuid": "^9.0.1" } } \ No newline at end of file diff --git a/website/package-lock.json b/website/package-lock.json index 93ddbb1a4..4b8509f12 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -15,7 +15,7 @@ "@mui/material": "5.15.6", "@mui/system": "5.15.6", "@nestia/migrate": "^0.14.0", - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", @@ -25,7 +25,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.3.1" + "typia": "^6.4.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -1059,13 +1059,13 @@ "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.14.0.tgz", "integrity": "sha512-jMoyUoPHfPQshnAyEx1nb4ASZJ/hKUt/mgzsrORpMGSg8HfcH6+vsLlt8la98ouKzf2meDNCRU5RzaI67kX5Tg==", "dependencies": { - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.2", - "typia": "^6.3.1" + "typia": "^6.4.0" }, "bin": { "migrate": "lib/executable/migrate.js" @@ -7704,7 +7704,7 @@ "resolved": "https://registry.npmjs.org/typia/-/typia-6.3.1.tgz", "integrity": "sha512-LQTrKAkrdX0bggngcXiNsAReB/r0QBk9CvmwGTdWxi21jmXde2KxG+waLdRdOLq8uyzb/vw7HOiesSqtPlvH3g==", "dependencies": { - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", diff --git a/website/package.json b/website/package.json index 1373c1766..e2d599a5a 100644 --- a/website/package.json +++ b/website/package.json @@ -24,7 +24,7 @@ "@mui/material": "5.15.6", "@mui/system": "5.15.6", "@nestia/migrate": "^0.14.0", - "@samchon/openapi": "^0.2.2", + "@samchon/openapi": "^0.3.0", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.3.1" + "typia": "^6.4.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/website/pages/docs/sdk/sdk.mdx b/website/pages/docs/sdk/sdk.mdx index f7ba7f81b..1724052ca 100644 --- a/website/pages/docs/sdk/sdk.mdx +++ b/website/pages/docs/sdk/sdk.mdx @@ -1250,8 +1250,8 @@ Also, if your SDK library utilize special alias `paths`, you also need to custom "ts-patch": "^3.1.0" }, "dependencies": { - "@nestia/fetcher": "^2.3.4", - "typia": "^6.0.0" + "@nestia/fetcher": "^3.4.1", + "typia": "^6.4.0" }, "files": [ "lib", From 131c1cf503645ecfe021d6a3f8f58c16c3cf7ea3 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 4 Jul 2024 18:11:58 +0900 Subject: [PATCH 002/204] Upgrade website dependencies --- website/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/package.json b/website/package.json index e2d599a5a..7be4396a2 100644 --- a/website/package.json +++ b/website/package.json @@ -23,8 +23,8 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/migrate": "^0.14.0", - "@samchon/openapi": "^0.3.0", + "@nestia/migrate": "^0.14.1", + "@samchon/openapi": "^0.4.0", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", From 849bd3eadc28989de25a6894db0256dec9d42e2a Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 5 Jul 2024 00:50:52 +0900 Subject: [PATCH 003/204] Add dev.to article link --- ...unction-call-schema-generator-from-swagger-document.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 website/public/articles/openai-function-call-schema-generator-from-swagger-document.html diff --git a/website/public/articles/openai-function-call-schema-generator-from-swagger-document.html b/website/public/articles/openai-function-call-schema-generator-from-swagger-document.html new file mode 100644 index 000000000..627c94543 --- /dev/null +++ b/website/public/articles/openai-function-call-schema-generator-from-swagger-document.html @@ -0,0 +1,6 @@ + + +; From a0b3598d8ed025f74a58aea24984040a5bc44d71 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 5 Jul 2024 00:59:07 +0900 Subject: [PATCH 004/204] Upgrade pnpm version in github actions --- .github/workflows/build.yml | 2 +- .github/workflows/website.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18dfae7bc..9313a8ea4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.x - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v4 with: version: 8 diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 122fa0ff3..739ae939c 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.x - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v4 with: version: 8 - name: Root Install From 96cda80952c88511c66ab3966d5312d7fbceda7b Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 5 Jul 2024 01:01:48 +0900 Subject: [PATCH 005/204] Fix wrong dependency version in website/package.json --- website/package-lock.json | 34 +++++++++++++++++----------------- website/package.json | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 4b8509f12..b03879473 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -14,7 +14,7 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/migrate": "^0.14.0", + "@nestia/migrate": "^0.14.1", "@samchon/openapi": "^0.3.0", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", @@ -1055,16 +1055,16 @@ } }, "node_modules/@nestia/migrate": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.14.0.tgz", - "integrity": "sha512-jMoyUoPHfPQshnAyEx1nb4ASZJ/hKUt/mgzsrORpMGSg8HfcH6+vsLlt8la98ouKzf2meDNCRU5RzaI67kX5Tg==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.14.1.tgz", + "integrity": "sha512-cVYCvr7tphehWTNctyR4Lir3x38iVEdQKaGUS9Q07hPSxq7mzkWDfkvKJPlPKgiFe7eWiJXTYIWVk6j/elI0UQ==", "dependencies": { "@samchon/openapi": "^0.3.0", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", "tstl": "^3.0.0", - "typescript": "^5.5.2", + "typescript": "^5.5.3", "typia": "^6.4.0" }, "bin": { @@ -1266,9 +1266,9 @@ } }, "node_modules/@samchon/openapi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.2.1.tgz", - "integrity": "sha512-SrvhAjqxu4Nt68KpOEmaKHeiwxoA4Bj+t93IbgJN4YpXmB/NmOvl28qnn4Hp/p4TGIIxzHf9pc27vpbzeDpmOQ==" + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.3.0.tgz", + "integrity": "sha512-rl+0XwM0DzSOiL664KB6oC5hgfMaXqxweGRVFdTt+U0bFJTIHLO+C+n9KCZUpMln8eQepXQ9RT8HjFAFe+Z6Hg==" }, "node_modules/@shikijs/core": { "version": "1.9.1", @@ -1999,9 +1999,9 @@ } }, "node_modules/comment-json": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.3.tgz", - "integrity": "sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.4.tgz", + "integrity": "sha512-E5AjpSW+O+N5T2GsOQMHLLsJvrYw6G/AFt9GvU6NguEAfzKShh7hRiLtVo6S9KbRpFMGqE5ojo0/hE+sdteWvQ==", "dependencies": { "array-timsort": "^1.0.3", "core-util-is": "^1.0.3", @@ -7688,9 +7688,9 @@ } }, "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7700,9 +7700,9 @@ } }, "node_modules/typia": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/typia/-/typia-6.3.1.tgz", - "integrity": "sha512-LQTrKAkrdX0bggngcXiNsAReB/r0QBk9CvmwGTdWxi21jmXde2KxG+waLdRdOLq8uyzb/vw7HOiesSqtPlvH3g==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/typia/-/typia-6.4.0.tgz", + "integrity": "sha512-VJszDm+zGVrA3do9NApwfQYvd2J29vN3H9TpBW4FStVsQazX18GRXx8PmFWAxKb2dJTobUpIm2kQxQKVns6mkA==", "dependencies": { "@samchon/openapi": "^0.3.0", "commander": "^10.0.0", diff --git a/website/package.json b/website/package.json index 7be4396a2..0ff6eb3f4 100644 --- a/website/package.json +++ b/website/package.json @@ -24,7 +24,7 @@ "@mui/material": "5.15.6", "@mui/system": "5.15.6", "@nestia/migrate": "^0.14.1", - "@samchon/openapi": "^0.4.0", + "@samchon/openapi": "^0.3.0", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", From 6b77f3ce51d7af0ecb6c6d1aff85d80f70f2823d Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sat, 6 Jul 2024 01:11:10 +0900 Subject: [PATCH 006/204] Detect transformation level commpiler error in `@nestia/sdk`. --- README.md | 2 +- package.json | 2 +- packages/core/README.md | 2 +- packages/core/package.json | 6 +- .../core/src/decorators/EncryptedRoute.ts | 2 +- packages/core/src/decorators/TypedParam.ts | 2 +- .../core/src/decorators/WebSocketRoute.ts | 2 +- .../internal/NoTransformConfigureError.ts | 25 +++++--- .../internal/get_path_and_querify.ts | 2 +- .../internal/get_path_and_stringify.ts | 2 +- .../internal/validate_request_body.ts | 2 +- .../internal/validate_request_form_data.ts | 2 +- .../internal/validate_request_headers.ts | 2 +- .../internal/validate_request_query.ts | 2 +- packages/fetcher/README.md | 2 +- packages/fetcher/package.json | 2 +- packages/sdk/README.md | 2 +- packages/sdk/package.json | 8 ++- packages/sdk/src/NestiaSdkApplication.ts | 60 +++++++++++++++++++ packages/sdk/src/generates/SdkGenerator.ts | 39 ++++++++++++ .../sdk/src/generates/SwaggerGenerator.ts | 4 +- test/features/all/swagger.json | 2 +- .../swagger.json | 2 +- .../app-globalPrefix-versionUri/swagger.json | 2 +- test/features/app-globalPrefix/swagger.json | 2 +- test/features/app-routerModule/swagger.json | 2 +- test/features/app-versionHeader/swagger.json | 2 +- test/features/app-versionUri/swagger.json | 2 +- test/features/app/swagger.json | 2 +- test/features/beautify-4/swagger.json | 2 +- test/features/beautify-false/swagger.json | 2 +- test/features/beautify/swagger.json | 2 +- test/features/body-config-assert/swagger.json | 2 +- .../body-config-assertClone/swagger.json | 2 +- .../body-config-assertEquals/swagger.json | 2 +- .../body-config-assertPrune/swagger.json | 2 +- test/features/body-config-equals/swagger.json | 2 +- test/features/body-config-is/swagger.json | 2 +- .../body-config-validate/swagger.json | 2 +- .../body-config-validateClone/swagger.json | 2 +- .../body-config-validateEquals/swagger.json | 2 +- .../body-config-validatePrune/swagger.json | 2 +- .../body-error-generic/src/api/HttpError.ts | 1 + .../body-error-generic/src/api/IConnection.ts | 1 + .../body-error-generic/src/api/Primitive.ts | 1 + .../src/api/functional/body/index.ts | 56 +++++++++++++++++ .../src/api/functional/health/index.ts | 35 +++++++++++ .../src/api/functional/index.ts | 8 +++ .../body-error-generic/src/api/index.ts | 4 ++ .../body-error-generic/src/api/module.ts | 5 ++ .../src/controllers/TypedBodyController.ts | 2 +- .../body-generic-default/swagger.json | 2 +- test/features/body-manual-assert/swagger.json | 2 +- test/features/body-manual-is/swagger.json | 2 +- .../body-manual-validate/swagger.json | 2 +- test/features/body/swagger.json | 2 +- test/features/cli-config-project/swagger.json | 2 +- test/features/cli-config/swagger.json | 2 +- test/features/cli-project/swagger.json | 2 +- .../partial_dto_test/partial_type/index.ts | 4 +- .../src/api/structures/IPartialInterface.ts | 2 +- ...ed_atoriginal_optionalundefinable_attrd.ts | 16 +++++ ...rtial_dto_test_partial_type_partialType.ts | 4 +- .../swagger.json | 2 +- .../src/api/functional/users/user/index.ts | 4 +- ...Useremailnamenullable_attroptional_attr.ts | 15 +++++ .../test_api_users_user_updateUserProfile.ts | 4 +- .../features/clone-and-propagate/swagger.json | 12 ++-- test/features/clone-implicit/swagger.json | 2 +- test/features/clone-native/swagger.json | 2 +- test/features/config-pattern/swagger.json | 2 +- test/features/date/swagger.json | 2 +- .../packages/api/package.json | 4 +- .../distribute-assert-json/swagger.json | 2 +- .../packages/api/package.json | 4 +- test/features/distribute-assert/swagger.json | 2 +- .../distribute-json/packages/api/package.json | 4 +- test/features/distribute-json/swagger.json | 2 +- .../distribute/packages/api/package.json | 4 +- test/features/distribute/swagger.json | 2 +- test/features/duplicated/swagger.json | 2 +- test/features/e2e/swagger.json | 2 +- test/features/encrypted/swagger.json | 2 +- test/features/exception-filter/swagger.json | 2 +- .../exception-with-propagate/swagger.json | 2 +- test/features/exception/swagger.json | 2 +- test/features/fastify/swagger.json | 2 +- test/features/headers-decompose/swagger.json | 2 +- test/features/headers/swagger.json | 2 +- test/features/ignore/swagger.json | 2 +- test/features/kebab/swagger.json | 2 +- test/features/method/swagger.json | 2 +- test/features/migrate/swagger.json | 2 +- .../multipart-form-data-fastify/swagger.json | 2 +- .../features/multipart-form-data/swagger.json | 2 +- test/features/non-equals/swagger.json | 2 +- test/features/operationId/swagger.json | 2 +- test/features/param/swagger.json | 2 +- test/features/plain/swagger.json | 2 +- test/features/propagate/swagger.json | 2 +- test/package.json | 8 +-- website/pages/docs/index.mdx | 2 +- 102 files changed, 370 insertions(+), 118 deletions(-) create mode 100644 test/features/body-error-generic/src/api/HttpError.ts create mode 100644 test/features/body-error-generic/src/api/IConnection.ts create mode 100644 test/features/body-error-generic/src/api/Primitive.ts create mode 100644 test/features/body-error-generic/src/api/functional/body/index.ts create mode 100644 test/features/body-error-generic/src/api/functional/health/index.ts create mode 100644 test/features/body-error-generic/src/api/functional/index.ts create mode 100644 test/features/body-error-generic/src/api/index.ts create mode 100644 test/features/body-error-generic/src/api/module.ts create mode 100644 test/features/clone-and-exact-optional-property/src/api/structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd.ts create mode 100644 test/features/clone-and-propagate/src/api/structures/PartialPickIUseremailnamenullable_attroptional_attr.ts diff --git a/README.md b/README.md index 1d124f0a4..f15c2baa7 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Mockup Simulator for client applications - Automatic E2E test functions generator - `@nestia/e2e` - - Test program utilizng e2e test functions + - Test program utilizing e2e test functions - Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor diff --git a/package.json b/package.json index 7f3493870..5ae0d8b86 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.4.1", + "version": "3.4.2", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/README.md b/packages/core/README.md index 1d124f0a4..f15c2baa7 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -19,7 +19,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Mockup Simulator for client applications - Automatic E2E test functions generator - `@nestia/e2e` - - Test program utilizng e2e test functions + - Test program utilizing e2e test functions - Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor diff --git a/packages/core/package.json b/packages/core/package.json index 714c03605..1418c5cd7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.4.1", + "version": "3.4.2", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.1", + "@nestia/fetcher": "^3.4.2", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.0", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.1", + "@nestia/fetcher": ">=3.4.2", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/core/src/decorators/EncryptedRoute.ts b/packages/core/src/decorators/EncryptedRoute.ts index a4c6eb5f3..655e735bf 100644 --- a/packages/core/src/decorators/EncryptedRoute.ts +++ b/packages/core/src/decorators/EncryptedRoute.ts @@ -146,7 +146,7 @@ class EncryptedRouteInterceptor implements NestInterceptor { context.getClass(), ); if (!param) - throw NoTransformConfigureError(`EncryptedRoute.${this.method}`); + return NoTransformConfigureError(`EncryptedRoute.${this.method}`); const headers: Singleton> = new Singleton(() => { const request: express.Request = http.getRequest(); diff --git a/packages/core/src/decorators/TypedParam.ts b/packages/core/src/decorators/TypedParam.ts index c3b523d82..da591a974 100644 --- a/packages/core/src/decorators/TypedParam.ts +++ b/packages/core/src/decorators/TypedParam.ts @@ -36,7 +36,7 @@ export function TypedParam( name: string, assert?: (value: string) => T, ): ParameterDecorator { - if (assert === undefined) throw NoTransformConfigureError("TypedParam"); + if (assert === undefined) return NoTransformConfigureError("TypedParam"); return createParamDecorator(function TypedParam( {}: any, diff --git a/packages/core/src/decorators/WebSocketRoute.ts b/packages/core/src/decorators/WebSocketRoute.ts index b12f41a2b..e85281f18 100644 --- a/packages/core/src/decorators/WebSocketRoute.ts +++ b/packages/core/src/decorators/WebSocketRoute.ts @@ -167,7 +167,7 @@ export namespace WebSocketRoute { assert?: (value: string) => T, ): ParameterDecorator { if (assert === undefined) - throw NoTransformConfigureError("WebSocketRoute.Param"); + return NoTransformConfigureError("WebSocketRoute.Param"); return function WebSocketParam( target: Object, propertyKey: string | symbol | undefined, diff --git a/packages/core/src/decorators/internal/NoTransformConfigureError.ts b/packages/core/src/decorators/internal/NoTransformConfigureError.ts index a68c531b1..ec3d47ca1 100644 --- a/packages/core/src/decorators/internal/NoTransformConfigureError.ts +++ b/packages/core/src/decorators/internal/NoTransformConfigureError.ts @@ -1,12 +1,21 @@ /** * @internal */ -export function NoTransformConfigureError(method: string): Error { - return new Error( - [ - `Error on nestia.core.${method}(): no transform has been configured.`, - `Run "npx typia setup" command, or check if you're using non-standard TypeScript compiler like Babel or SWC.`, - `Otherwise you're running "npx nestia sdk/swagger" or similar, run "npx tsc" command to find the reason why.`, - ].join(" "), - ); +export function NoTransformConfigureError(method: string): never { + if (NoTransformConfigureError.throws === true) + throw new Error( + [ + `Error on nestia.core.${method}(): no transform has been configured.`, + `Run "npx typia setup" command, or check if you're using non-standard TypeScript compiler like Babel or SWC.`, + `Otherwise you're running "npx nestia sdk/swagger" or similar, run "npx tsc" command to find the reason why.`, + ].join(" "), + ); + return undefined as never; +} + +/** + * @internal + */ +export namespace NoTransformConfigureError { + export let throws = true; } diff --git a/packages/core/src/decorators/internal/get_path_and_querify.ts b/packages/core/src/decorators/internal/get_path_and_querify.ts index 5cf61c642..df727e9fc 100644 --- a/packages/core/src/decorators/internal/get_path_and_querify.ts +++ b/packages/core/src/decorators/internal/get_path_and_querify.ts @@ -29,7 +29,7 @@ export const get_path_and_querify = const take = (method: string) => (functor?: IResponseBodyQuerifier | null) => { - if (functor === undefined) throw NoTransformConfigureError(method); + if (functor === undefined) return NoTransformConfigureError(method); else if (functor === null) return querify; else if (functor.type === "stringify") return functor.stringify; else if (functor.type === "assert") return assert(functor.assert); diff --git a/packages/core/src/decorators/internal/get_path_and_stringify.ts b/packages/core/src/decorators/internal/get_path_and_stringify.ts index 6fe2614a2..8d8d8a617 100644 --- a/packages/core/src/decorators/internal/get_path_and_stringify.ts +++ b/packages/core/src/decorators/internal/get_path_and_stringify.ts @@ -27,7 +27,7 @@ export const get_path_and_stringify = const take = (method: string) => (functor?: IResponseBodyStringifier | null) => { - if (functor === undefined) throw NoTransformConfigureError(method); + if (functor === undefined) return NoTransformConfigureError(method); else if (functor === null) return JSON.stringify; else if (functor.type === "stringify") return functor.stringify; else if (functor.type === "assert") return assert(functor.assert); diff --git a/packages/core/src/decorators/internal/validate_request_body.ts b/packages/core/src/decorators/internal/validate_request_body.ts index cd4539e9d..1cdc4136b 100644 --- a/packages/core/src/decorators/internal/validate_request_body.ts +++ b/packages/core/src/decorators/internal/validate_request_body.ts @@ -10,7 +10,7 @@ import { NoTransformConfigureError } from "./NoTransformConfigureError"; export const validate_request_body = (method: string) => (validator?: IRequestBodyValidator) => { - if (!validator) throw NoTransformConfigureError(method); + if (!validator) return NoTransformConfigureError(method); else if (validator.type === "assert") return assert(validator.assert); else if (validator.type === "is") return is(validator.is); else if (validator.type === "validate") return validate(validator.validate); diff --git a/packages/core/src/decorators/internal/validate_request_form_data.ts b/packages/core/src/decorators/internal/validate_request_form_data.ts index d9ddc758e..132908c93 100644 --- a/packages/core/src/decorators/internal/validate_request_form_data.ts +++ b/packages/core/src/decorators/internal/validate_request_form_data.ts @@ -10,7 +10,7 @@ import { NoTransformConfigureError } from "./NoTransformConfigureError"; export const validate_request_form_data = ( props?: IRequestFormDataProps, ) => { - if (!props) throw NoTransformConfigureError("TypedFormData.Bpdu"); + if (!props) return NoTransformConfigureError("TypedFormData.Bpdu"); else if (props.validator.type === "assert") return assert(props.validator.assert); else if (props.validator.type === "is") return is(props.validator.is); diff --git a/packages/core/src/decorators/internal/validate_request_headers.ts b/packages/core/src/decorators/internal/validate_request_headers.ts index cb1e935dd..1f5e5529a 100644 --- a/packages/core/src/decorators/internal/validate_request_headers.ts +++ b/packages/core/src/decorators/internal/validate_request_headers.ts @@ -10,7 +10,7 @@ import { NoTransformConfigureError } from "./NoTransformConfigureError"; export const validate_request_headers = ( validator?: IRequestHeadersValidator, ) => { - if (!validator) throw NoTransformConfigureError("TypedHeaders"); + if (!validator) return NoTransformConfigureError("TypedHeaders"); else if (validator.type === "assert") return assert(validator.assert); else if (validator.type === "is") return is(validator.is); else if (validator.type === "validate") return validate(validator.validate); diff --git a/packages/core/src/decorators/internal/validate_request_query.ts b/packages/core/src/decorators/internal/validate_request_query.ts index cdbb489b9..bc3671fb7 100644 --- a/packages/core/src/decorators/internal/validate_request_query.ts +++ b/packages/core/src/decorators/internal/validate_request_query.ts @@ -10,7 +10,7 @@ import { NoTransformConfigureError } from "./NoTransformConfigureError"; export const validate_request_query = (method: string) => (validator?: IRequestQueryValidator) => { - if (!validator) throw NoTransformConfigureError(method); + if (!validator) return NoTransformConfigureError(method); else if (validator.type === "assert") return assert(validator.assert); else if (validator.type === "is") return is(validator.is); else if (validator.type === "validate") return validate(validator.validate); diff --git a/packages/fetcher/README.md b/packages/fetcher/README.md index 1d124f0a4..f15c2baa7 100644 --- a/packages/fetcher/README.md +++ b/packages/fetcher/README.md @@ -19,7 +19,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Mockup Simulator for client applications - Automatic E2E test functions generator - `@nestia/e2e` - - Test program utilizng e2e test functions + - Test program utilizing e2e test functions - Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 195628995..edd43bf2e 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.4.1", + "version": "3.4.2", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 1d124f0a4..f15c2baa7 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -19,7 +19,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Mockup Simulator for client applications - Automatic E2E test functions generator - `@nestia/e2e` - - Test program utilizng e2e test functions + - Test program utilizing e2e test functions - Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor diff --git a/packages/sdk/package.json b/packages/sdk/package.json index f367b28c3..7d66ce82d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.4.1", + "version": "3.4.2", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,7 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.1", + "@nestia/fetcher": "^3.4.2", + "@nestia/core": "^3.4.2", "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -46,7 +47,8 @@ "typia": "^6.4.0" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.1", + "@nestia/fetcher": ">=3.4.2", + "@nestia/core": ">=3.4.2", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/NestiaSdkApplication.ts b/packages/sdk/src/NestiaSdkApplication.ts index 9de67f82e..dc4ece96d 100644 --- a/packages/sdk/src/NestiaSdkApplication.ts +++ b/packages/sdk/src/NestiaSdkApplication.ts @@ -1,3 +1,4 @@ +import transform from "@nestia/core/lib/transform"; import fs from "fs"; import path from "path"; import ts from "typescript"; @@ -114,6 +115,7 @@ export class NestiaSdkApplication { }; console.log("Analyzing reflections"); + await turnTransformError(false); for (const include of (await ConfigAnalyzer.input(this.config)).include) controllers.push( ...(await ReflectControllerAnalyzer.analyze(project)( @@ -123,6 +125,7 @@ export class NestiaSdkApplication { include.controller, )), ); + await turnTransformError(true); const agg: number = (() => { const set: Set = new Set(); @@ -159,6 +162,25 @@ export class NestiaSdkApplication { ); project.checker = program.getTypeChecker(); + const diagnostics: ts.Diagnostic[] = []; + ts.transform( + program + .getSourceFiles() + .filter((file) => false === file.isDeclarationFile), + [ + transform( + program, + ((this.compilerOptions.plugins as any) ?? []).find( + (p: any) => p.transform === "@nestia/core/lib/transform", + ) ?? {}, + { + addDiagnostic: (diag) => diagnostics.push(diag), + }, + ), + ], + program.getCompilerOptions(), + ); + const routeList: Array = []; for (const c of controllers) { const file: ts.SourceFile | undefined = program.getSourceFile(c.file); @@ -168,6 +190,36 @@ export class NestiaSdkApplication { ); } + // TRACE ERRORS + for (const diag of diagnostics) { + const file: string = diag.file + ? path.relative(diag.file.fileName, process.cwd()) + : "(unknown file)"; + const category: string = + diag.category === ts.DiagnosticCategory.Warning + ? "warning" + : diag.category === ts.DiagnosticCategory.Error + ? "error" + : diag.category === ts.DiagnosticCategory.Suggestion + ? "suggestion" + : diag.category === ts.DiagnosticCategory.Message + ? "message" + : "unkown"; + const [line, pos] = diag.file + ? (() => { + const lines: string[] = diag + .file!.text.substring(0, diag.start) + .split("\n"); + if (lines.length === 0) return [0, 0]; + return [lines.length, lines.at(-1)!.length + 1]; + })() + : [0, 0]; + console.error( + `${file}:${line}:${pos} - ${category} TS${diag.code}: ${diag.messageText}`, + ); + } + if (diagnostics.length) process.exit(-1); + // REPORT ERRORS if (project.errors.length) { report_errors("error")(project.errors); @@ -255,3 +307,11 @@ const report_errors = }; const VARIABLE = /[a-zA-Z_$0-9]/; +const turnTransformError = async (flag: boolean): Promise => { + try { + const modulo = await import( + "@nestia/core/lib/decorators/internal/NoTransformConfigureError" as string + ); + modulo.NoTransformConfigureError.throws = flag; + } catch {} +}; diff --git a/packages/sdk/src/generates/SdkGenerator.ts b/packages/sdk/src/generates/SdkGenerator.ts index e434a10f6..bd7f0a922 100644 --- a/packages/sdk/src/generates/SdkGenerator.ts +++ b/packages/sdk/src/generates/SdkGenerator.ts @@ -1,11 +1,15 @@ import fs from "fs"; import NodePath from "path"; +import path from "path"; import { IPointer } from "tstl"; +import { MetadataCollection } from "typia/lib/factories/MetadataCollection"; import { INestiaProject } from "../structures/INestiaProject"; +import { ISwaggerError } from "../structures/ISwaggerError"; import { ITypedHttpRoute } from "../structures/ITypedHttpRoute"; import { ITypedWebSocketRoute } from "../structures/ITypedWebSocketRoute"; import { CloneGenerator } from "./CloneGenerator"; +import { SwaggerGenerator } from "./SwaggerGenerator"; import { SdkDistributionComposer } from "./internal/SdkDistributionComposer"; import { SdkFileProgrammer } from "./internal/SdkFileProgrammer"; @@ -17,6 +21,41 @@ export namespace SdkGenerator { ): Promise => { console.log("Generating SDK Library"); + // VALIDATE THROUGH SWAGGER GENERATOR + const errors: ISwaggerError[] = []; + const validator = SwaggerGenerator.generate_route({ + config: { output: "" }, + checker: project.checker, + collection: new MetadataCollection({ + replace: MetadataCollection.replace, + }), + lazyProperties: [], + lazySchemas: [], + errors, + swagger: { + openapi: "3.1.0", + paths: {}, + components: { + schemas: {}, + }, + "x-samchon-emended": true, + }, + }); + for (const r of routes) if (r.protocol === "http") validator(r); + if (errors.length) { + for (const e of errors) + console.error( + `${path.relative(process.cwd(), e.route.location)}:${ + e.route.controller.name + }.${e.route.name}:${ + e.from + } - error TS(@nestia/sdk): invalid type detected.\n\n` + + e.messages.map((m) => ` - ${m}`).join("\n"), + "\n\n", + ); + throw new TypeError("Invalid type detected"); + } + // PREPARE NEW DIRECTORIES try { await fs.promises.mkdir(project.config.output!); diff --git a/packages/sdk/src/generates/SwaggerGenerator.ts b/packages/sdk/src/generates/SwaggerGenerator.ts index 0e6f9c444..7969cb297 100644 --- a/packages/sdk/src/generates/SwaggerGenerator.ts +++ b/packages/sdk/src/generates/SwaggerGenerator.ts @@ -281,7 +281,7 @@ export namespace SwaggerGenerator { /* --------------------------------------------------------- INITIALIZERS --------------------------------------------------------- */ - const initialize = async ( + export const initialize = async ( config: INestiaConfig.ISwaggerConfig, ): Promise => { const pack = new Singleton( @@ -370,7 +370,7 @@ export namespace SwaggerGenerator { return path; } - const generate_route = + export const generate_route = (props: IProps) => (route: ITypedHttpRoute): OpenApi.IOperation => { // FIND REQUEST BODY diff --git a/test/features/all/swagger.json b/test/features/all/swagger.json index 3543093ad..55161bf2d 100644 --- a/test/features/all/swagger.json +++ b/test/features/all/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.1-dev.20240703", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json index 736ff3e40..6ecbbd725 100644 --- a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json +++ b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix-versionUri/swagger.json b/test/features/app-globalPrefix-versionUri/swagger.json index e161ca81f..768db2ec1 100644 --- a/test/features/app-globalPrefix-versionUri/swagger.json +++ b/test/features/app-globalPrefix-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix/swagger.json b/test/features/app-globalPrefix/swagger.json index 10f911807..3dab72fb4 100644 --- a/test/features/app-globalPrefix/swagger.json +++ b/test/features/app-globalPrefix/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-routerModule/swagger.json b/test/features/app-routerModule/swagger.json index 4749bc885..5ba36d72d 100644 --- a/test/features/app-routerModule/swagger.json +++ b/test/features/app-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionHeader/swagger.json b/test/features/app-versionHeader/swagger.json index 2f17d3fa2..6f5f88be4 100644 --- a/test/features/app-versionHeader/swagger.json +++ b/test/features/app-versionHeader/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionUri/swagger.json b/test/features/app-versionUri/swagger.json index ead36d214..de4c1b753 100644 --- a/test/features/app-versionUri/swagger.json +++ b/test/features/app-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app/swagger.json b/test/features/app/swagger.json index 6933c9b16..b4fc2c4d7 100644 --- a/test/features/app/swagger.json +++ b/test/features/app/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.1-dev.20240703","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify-4/swagger.json b/test/features/beautify-4/swagger.json index d9b10a27a..f2bb67a1e 100644 --- a/test/features/beautify-4/swagger.json +++ b/test/features/beautify-4/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/beautify-false/swagger.json b/test/features/beautify-false/swagger.json index 7509ecbd0..31fd02b4b 100644 --- a/test/features/beautify-false/swagger.json +++ b/test/features/beautify-false/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify/swagger.json b/test/features/beautify/swagger.json index 306592dfa..7e1e7be9b 100644 --- a/test/features/beautify/swagger.json +++ b/test/features/beautify/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/body-config-assert/swagger.json b/test/features/body-config-assert/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-assert/swagger.json +++ b/test/features/body-config-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertClone/swagger.json b/test/features/body-config-assertClone/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-assertClone/swagger.json +++ b/test/features/body-config-assertClone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertEquals/swagger.json b/test/features/body-config-assertEquals/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-assertEquals/swagger.json +++ b/test/features/body-config-assertEquals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertPrune/swagger.json b/test/features/body-config-assertPrune/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-assertPrune/swagger.json +++ b/test/features/body-config-assertPrune/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-equals/swagger.json b/test/features/body-config-equals/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-equals/swagger.json +++ b/test/features/body-config-equals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-is/swagger.json b/test/features/body-config-is/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-is/swagger.json +++ b/test/features/body-config-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validate/swagger.json b/test/features/body-config-validate/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-validate/swagger.json +++ b/test/features/body-config-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validateClone/swagger.json b/test/features/body-config-validateClone/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-validateClone/swagger.json +++ b/test/features/body-config-validateClone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validateEquals/swagger.json b/test/features/body-config-validateEquals/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-validateEquals/swagger.json +++ b/test/features/body-config-validateEquals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validatePrune/swagger.json b/test/features/body-config-validatePrune/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-config-validatePrune/swagger.json +++ b/test/features/body-config-validatePrune/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-error-generic/src/api/HttpError.ts b/test/features/body-error-generic/src/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/test/features/body-error-generic/src/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/test/features/body-error-generic/src/api/IConnection.ts b/test/features/body-error-generic/src/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/test/features/body-error-generic/src/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/test/features/body-error-generic/src/api/Primitive.ts b/test/features/body-error-generic/src/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/test/features/body-error-generic/src/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/test/features/body-error-generic/src/api/functional/body/index.ts b/test/features/body-error-generic/src/api/functional/body/index.ts new file mode 100644 index 000000000..941fd8045 --- /dev/null +++ b/test/features/body-error-generic/src/api/functional/body/index.ts @@ -0,0 +1,56 @@ +/** + * @packageDocumentation + * @module api.functional.body + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +import type { ISomething, T } from "../../../controllers/TypedBodyController"; + +/** + * @controller TypedBodyController.generic + * @path POST /body/generic + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function generic( + connection: IConnection, + input: generic.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...generic.METADATA, + template: generic.METADATA.path, + path: generic.path(), + }, + input, + ); +} +export namespace generic { + export type Input = Primitive>; + export type Output = Primitive>; + + export const METADATA = { + method: "POST", + path: "/body/generic", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/body/generic"; +} diff --git a/test/features/body-error-generic/src/api/functional/health/index.ts b/test/features/body-error-generic/src/api/functional/health/index.ts new file mode 100644 index 000000000..d5a9f9925 --- /dev/null +++ b/test/features/body-error-generic/src/api/functional/health/index.ts @@ -0,0 +1,35 @@ +/** + * @packageDocumentation + * @module api.functional.health + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +/** + * @controller HealthController.get + * @path GET /health + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function get(connection: IConnection): Promise { + return PlainFetcher.fetch(connection, { + ...get.METADATA, + template: get.METADATA.path, + path: get.path(), + }); +} +export namespace get { + export const METADATA = { + method: "GET", + path: "/health", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/health"; +} diff --git a/test/features/body-error-generic/src/api/functional/index.ts b/test/features/body-error-generic/src/api/functional/index.ts new file mode 100644 index 000000000..e0826058b --- /dev/null +++ b/test/features/body-error-generic/src/api/functional/index.ts @@ -0,0 +1,8 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as health from "./health"; +export * as body from "./body"; diff --git a/test/features/body-error-generic/src/api/index.ts b/test/features/body-error-generic/src/api/index.ts new file mode 100644 index 000000000..1705f43c8 --- /dev/null +++ b/test/features/body-error-generic/src/api/index.ts @@ -0,0 +1,4 @@ +import * as api from "./module"; + +export * from "./module"; +export default api; diff --git a/test/features/body-error-generic/src/api/module.ts b/test/features/body-error-generic/src/api/module.ts new file mode 100644 index 000000000..dbb6e9a51 --- /dev/null +++ b/test/features/body-error-generic/src/api/module.ts @@ -0,0 +1,5 @@ +export type * from "./IConnection"; +export type * from "./Primitive"; +export * from "./HttpError"; + +export * as functional from "./functional"; diff --git a/test/features/body-error-generic/src/controllers/TypedBodyController.ts b/test/features/body-error-generic/src/controllers/TypedBodyController.ts index 602f4c206..986458037 100644 --- a/test/features/body-error-generic/src/controllers/TypedBodyController.ts +++ b/test/features/body-error-generic/src/controllers/TypedBodyController.ts @@ -3,7 +3,7 @@ import { Controller } from "@nestjs/common"; @Controller("body") export class TypedBodyController { - @core.TypedRoute.Get("generic") + @core.TypedRoute.Post("generic") public async generic( @core.TypedBody() input: ISomething, ): Promise> { diff --git a/test/features/body-generic-default/swagger.json b/test/features/body-generic-default/swagger.json index 98b441bb8..72b38998e 100644 --- a/test/features/body-generic-default/swagger.json +++ b/test/features/body-generic-default/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/google/{accountCode}/drives/images/upload/single":{"post":{"tags":["Google"],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"구글 계정명","required":true}],"requestBody":{"description":"단일 이미지 파일 업로드 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveImageSingleUpload"}}},"required":true},"responses":{"201":{"description":"업로드 완료된 구글 드라이브 파일 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveFile"}}}}},"summary":"단일 이미지 파일 업로드","description":"단일 이미지 파일 업로드.\n\n단 하나의 이미지 파일을 구글 드라이브에 개별 업로드한다."}},"/google/{accountCode}/drives/images/upload/activate":{"post":{"tags":[],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleTokenActivategoogle-authnever"}}},"required":true},"responses":{"201":{"description":""}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStorestring"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticlestring"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStorestring"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IGoogleDriveImageSingleUpload":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth-key","title":"구글 사용자 인증 키","description":"구글 사용자 인증 키.\n\n구글 드라이브에 이미지 파일을 업로드하기 위하여, 구글 사용자 인증이 선행되어야 한다.\n본 필드값에는, 바로 그 사전 인증하여 발급받은 사용자 인증 키를 할당해주어야 함.\n그리고 그 인증 키는, read 및 write scope 에 대하여 대응 가능하여야 한다."},"url":{"oneOf":[{"type":"string","format":"uri","contentMediaType":"image/png"},{"type":"string","format":"uri","contentMediaType":"image/jpg"}],"title":"이미지 파일 경로","description":"이미지 파일 경로.\n\nWorkflow Editor 상 Inspector 내지 Chat Agent 의 File Uploader 의하여 구성됨."},"location":{"type":"string","title":"파일 경로","description":"이미지 파일이 위치할 경로, 파일명 및 확장자는 제외."},"name":{"type":"string","x-wrtn-placeholder":"파일명을 입력해주세요.","title":"파일명","description":"파일명.\n\n확장자가 제외된, 순수 파일명.\n\n{@link url} 의 실제 파일명과 다르게 업로드 가능."},"extension":{"oneOf":[{"const":"jpg"},{"const":"png"}],"title":"이미지 확장자","description":"이미지 확장자."}},"required":["token","url","location","name","extension"],"description":"구글 드라이브에의 이미지 업로드 DTO.\n\n구글 드라이브에 단일 이미지를 업로드할 때 사용하는 DTO. 만일 복수의 이미지를\n동시에 업로드하고 싶다면, `IGoogleDriveImageMultipleUpload` DTO 및 관련\nAPI 함수를 사용하도록 할 것."},"IGoogleDriveFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"location":{"type":"string"},"name":{"type":"string"},"extension":{"oneOf":[{"type":"null"},{"type":"string"}]},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","location","name","extension","url","created_at","updated_at"]},"IGoogleTokenActivategoogle-authnever":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth"}},"required":["token"]},"IBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","format","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticlestring":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","format","files"]},"PartialIBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Google"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/google/{accountCode}/drives/images/upload/single":{"post":{"tags":["Google"],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"구글 계정명","required":true}],"requestBody":{"description":"단일 이미지 파일 업로드 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveImageSingleUpload"}}},"required":true},"responses":{"201":{"description":"업로드 완료된 구글 드라이브 파일 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveFile"}}}}},"summary":"단일 이미지 파일 업로드","description":"단일 이미지 파일 업로드.\n\n단 하나의 이미지 파일을 구글 드라이브에 개별 업로드한다."}},"/google/{accountCode}/drives/images/upload/activate":{"post":{"tags":[],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleTokenActivategoogle-authnever"}}},"required":true},"responses":{"201":{"description":""}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStorestring"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticlestring"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStorestring"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IGoogleDriveImageSingleUpload":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth-key","title":"구글 사용자 인증 키","description":"구글 사용자 인증 키.\n\n구글 드라이브에 이미지 파일을 업로드하기 위하여, 구글 사용자 인증이 선행되어야 한다.\n본 필드값에는, 바로 그 사전 인증하여 발급받은 사용자 인증 키를 할당해주어야 함.\n그리고 그 인증 키는, read 및 write scope 에 대하여 대응 가능하여야 한다."},"url":{"oneOf":[{"type":"string","format":"uri","contentMediaType":"image/png"},{"type":"string","format":"uri","contentMediaType":"image/jpg"}],"title":"이미지 파일 경로","description":"이미지 파일 경로.\n\nWorkflow Editor 상 Inspector 내지 Chat Agent 의 File Uploader 의하여 구성됨."},"location":{"type":"string","title":"파일 경로","description":"이미지 파일이 위치할 경로, 파일명 및 확장자는 제외."},"name":{"type":"string","x-wrtn-placeholder":"파일명을 입력해주세요.","title":"파일명","description":"파일명.\n\n확장자가 제외된, 순수 파일명.\n\n{@link url} 의 실제 파일명과 다르게 업로드 가능."},"extension":{"oneOf":[{"const":"jpg"},{"const":"png"}],"title":"이미지 확장자","description":"이미지 확장자."}},"required":["token","url","location","name","extension"],"description":"구글 드라이브에의 이미지 업로드 DTO.\n\n구글 드라이브에 단일 이미지를 업로드할 때 사용하는 DTO. 만일 복수의 이미지를\n동시에 업로드하고 싶다면, `IGoogleDriveImageMultipleUpload` DTO 및 관련\nAPI 함수를 사용하도록 할 것."},"IGoogleDriveFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"location":{"type":"string"},"name":{"type":"string"},"extension":{"oneOf":[{"type":"null"},{"type":"string"}]},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","location","name","extension","url","created_at","updated_at"]},"IGoogleTokenActivategoogle-authnever":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth"}},"required":["token"]},"IBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","format","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticlestring":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","format","files"]},"PartialIBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Google"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-assert/swagger.json b/test/features/body-manual-assert/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-manual-assert/swagger.json +++ b/test/features/body-manual-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-is/swagger.json b/test/features/body-manual-is/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-manual-is/swagger.json +++ b/test/features/body-manual-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-validate/swagger.json b/test/features/body-manual-validate/swagger.json index 7535ec323..4232ec1b4 100644 --- a/test/features/body-manual-validate/swagger.json +++ b/test/features/body-manual-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body/swagger.json b/test/features/body/swagger.json index 7509ecbd0..31fd02b4b 100644 --- a/test/features/body/swagger.json +++ b/test/features/body/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-config-project/swagger.json b/test/features/cli-config-project/swagger.json index dd933e897..06a06d284 100644 --- a/test/features/cli-config-project/swagger.json +++ b/test/features/cli-config-project/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-config/swagger.json b/test/features/cli-config/swagger.json index dd933e897..06a06d284 100644 --- a/test/features/cli-config/swagger.json +++ b/test/features/cli-config/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-project/swagger.json b/test/features/cli-project/swagger.json index 57b776a3a..cf49adac8 100644 --- a/test/features/cli-project/swagger.json +++ b/test/features/cli-project/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/clone-and-exact-optional-property/src/api/functional/partial_dto_test/partial_type/index.ts b/test/features/clone-and-exact-optional-property/src/api/functional/partial_dto_test/partial_type/index.ts index faba1b3d1..fd99c90ac 100644 --- a/test/features/clone-and-exact-optional-property/src/api/functional/partial_dto_test/partial_type/index.ts +++ b/test/features/clone-and-exact-optional-property/src/api/functional/partial_dto_test/partial_type/index.ts @@ -14,8 +14,8 @@ import { NestiaSimulator } from "@nestia/fetcher/lib/NestiaSimulator"; import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; import typia from "typia"; -import type { PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr } from "../../../structures/PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr"; import type { PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb } from "../../../structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"; +import type { PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd } from "../../../structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"; /** * @controller PartialDTOTestController.partialType @@ -46,7 +46,7 @@ export async function partialType( } export namespace partialType { export type Input = - PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr; + PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd; export type Output = IPropagation<{ 201: PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb; }>; diff --git a/test/features/clone-and-exact-optional-property/src/api/structures/IPartialInterface.ts b/test/features/clone-and-exact-optional-property/src/api/structures/IPartialInterface.ts index f4ce04268..2a170b239 100644 --- a/test/features/clone-and-exact-optional-property/src/api/structures/IPartialInterface.ts +++ b/test/features/clone-and-exact-optional-property/src/api/structures/IPartialInterface.ts @@ -1,9 +1,9 @@ import type { Format } from "typia/lib/tags/Format"; export type IPartialInterface = { + a?: undefined | string; email?: null | undefined | (string & Format<"email">); created_at?: null | undefined | (string & Format<"date-time">); original_optional?: undefined | boolean; undefinable_attr?: undefined | string; - a?: undefined | string; }; diff --git a/test/features/clone-and-exact-optional-property/src/api/structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd.ts b/test/features/clone-and-exact-optional-property/src/api/structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd.ts new file mode 100644 index 000000000..3441d4d01 --- /dev/null +++ b/test/features/clone-and-exact-optional-property/src/api/structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd.ts @@ -0,0 +1,16 @@ +import type { Format } from "typia/lib/tags/Format"; + +/** + * Make all properties in T optional + */ +export type PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd = + /** + * Make all properties in T optional + */ + { + email?: null | undefined | (string & Format<"email">); + created_at?: null | undefined | (string & Format<"date-time">); + original_optional?: undefined | boolean; + undefinable_attr?: undefined | string; + d?: undefined | string; + }; diff --git a/test/features/clone-and-exact-optional-property/src/test/features/api/automated/test_api_partial_dto_test_partial_type_partialType.ts b/test/features/clone-and-exact-optional-property/src/test/features/api/automated/test_api_partial_dto_test_partial_type_partialType.ts index 39acccc50..ef643cd82 100644 --- a/test/features/clone-and-exact-optional-property/src/test/features/api/automated/test_api_partial_dto_test_partial_type_partialType.ts +++ b/test/features/clone-and-exact-optional-property/src/test/features/api/automated/test_api_partial_dto_test_partial_type_partialType.ts @@ -2,8 +2,8 @@ import type { IPropagation } from "@nestia/fetcher"; import typia from "typia"; import api from "../../../../api"; -import type { PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr } from "../../../../api/structures/PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr"; import type { PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb } from "../../../../api/structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"; +import type { PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd } from "../../../../api/structures/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"; export const test_api_partial_dto_test_partial_type_partialType = async ( connection: api.IConnection, @@ -12,7 +12,7 @@ export const test_api_partial_dto_test_partial_type_partialType = async ( 201: PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb; }> = await api.functional.partial_dto_test.partial_type.partialType( connection, - typia.random(), + typia.random(), ); typia.assert(output); }; diff --git a/test/features/clone-and-exact-optional-property/swagger.json b/test/features/clone-and-exact-optional-property/swagger.json index 9abda06b6..d8d9a14cb 100644 --- a/test/features/clone-and-exact-optional-property/swagger.json +++ b/test/features/clone-and-exact-optional-property/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/partial-dto-test/original":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal"}}}}}}},"/partial-dto-test/partial-interface":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal.IPartialInterface"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPartialInterface"}}}}}}},"/partial-dto-test/partial-type":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"}}}}}}}},"components":{"schemas":{"IOriginal":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"c":{"type":"string"},"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"required":["a","b","c","d","email","created_at"]},"IOriginal.IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"c":{"type":"string"}}},"IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"a":{"type":"string"}}},"PartialPickIOriginaldemailcreated_atoriginal_optionalundefinable_attr":{"type":"object","properties":{"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"description":"Make all properties in T optional"},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"b":{"type":"string"}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/partial-dto-test/original":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal"}}}}}}},"/partial-dto-test/partial-interface":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal.IPartialInterface"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPartialInterface"}}}}}}},"/partial-dto-test/partial-type":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"}}}}}}}},"components":{"schemas":{"IOriginal":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"c":{"type":"string"},"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"required":["a","b","c","d","email","created_at"]},"IOriginal.IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"c":{"type":"string"}}},"IPartialInterface":{"type":"object","properties":{"a":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}}},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"d":{"type":"string"}},"description":"Make all properties in T optional"},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"b":{"type":"string"}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/clone-and-propagate/src/api/functional/users/user/index.ts b/test/features/clone-and-propagate/src/api/functional/users/user/index.ts index 5e894f464..9b22b7fc8 100644 --- a/test/features/clone-and-propagate/src/api/functional/users/user/index.ts +++ b/test/features/clone-and-propagate/src/api/functional/users/user/index.ts @@ -15,7 +15,7 @@ import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; import typia from "typia"; import type { IUser } from "../../../structures/IUser"; -import type { PartialPickIUsernameemailnullable_attroptional_attr } from "../../../structures/PartialPickIUsernameemailnullable_attroptional_attr"; +import type { PartialPickIUseremailnamenullable_attroptional_attr } from "../../../structures/PartialPickIUseremailnamenullable_attroptional_attr"; /** * - When namespaced DTO type comes, `@nestia/sdk` had taken a mistake that writing only the deepest type even in the top or middle level namespaced types. @@ -147,7 +147,7 @@ export async function updateUserProfile( ); } export namespace updateUserProfile { - export type Input = PartialPickIUsernameemailnullable_attroptional_attr; + export type Input = PartialPickIUseremailnamenullable_attroptional_attr; export type Output = IPropagation<{ 201: IUser; }>; diff --git a/test/features/clone-and-propagate/src/api/structures/PartialPickIUseremailnamenullable_attroptional_attr.ts b/test/features/clone-and-propagate/src/api/structures/PartialPickIUseremailnamenullable_attroptional_attr.ts new file mode 100644 index 000000000..97c107014 --- /dev/null +++ b/test/features/clone-and-propagate/src/api/structures/PartialPickIUseremailnamenullable_attroptional_attr.ts @@ -0,0 +1,15 @@ +import type { Format } from "typia/lib/tags/Format"; + +/** + * Make all properties in T optional + */ +export type PartialPickIUseremailnamenullable_attroptional_attr = + /** + * Make all properties in T optional + */ + { + email?: null | undefined | (string & Format<"email">); + name?: undefined | string; + nullable_attr?: null | undefined | string; + optional_attr?: undefined | string; + }; diff --git a/test/features/clone-and-propagate/src/test/features/api/automated/test_api_users_user_updateUserProfile.ts b/test/features/clone-and-propagate/src/test/features/api/automated/test_api_users_user_updateUserProfile.ts index a2ceb180c..0b692c47b 100644 --- a/test/features/clone-and-propagate/src/test/features/api/automated/test_api_users_user_updateUserProfile.ts +++ b/test/features/clone-and-propagate/src/test/features/api/automated/test_api_users_user_updateUserProfile.ts @@ -3,7 +3,7 @@ import typia from "typia"; import api from "../../../../api"; import type { IUser } from "../../../../api/structures/IUser"; -import type { PartialPickIUsernameemailnullable_attroptional_attr } from "../../../../api/structures/PartialPickIUsernameemailnullable_attroptional_attr"; +import type { PartialPickIUseremailnamenullable_attroptional_attr } from "../../../../api/structures/PartialPickIUseremailnamenullable_attroptional_attr"; export const test_api_users_user_updateUserProfile = async ( connection: api.IConnection, @@ -13,7 +13,7 @@ export const test_api_users_user_updateUserProfile = async ( }> = await api.functional.users.user.updateUserProfile( connection, typia.random(), - typia.random(), + typia.random(), ); typia.assert(output); }; diff --git a/test/features/clone-and-propagate/swagger.json b/test/features/clone-and-propagate/swagger.json index f08b6c1c1..ea9dde47a 100644 --- a/test/features/clone-and-propagate/swagger.json +++ b/test/features/clone-and-propagate/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { @@ -1633,7 +1633,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PartialPickIUsernameemailnullable_attroptional_attr" + "$ref": "#/components/schemas/PartialPickIUseremailnamenullable_attroptional_attr" } } }, @@ -3941,12 +3941,9 @@ } ] }, - "PartialPickIUsernameemailnullable_attroptional_attr": { + "PartialPickIUseremailnamenullable_attroptional_attr": { "type": "object", "properties": { - "name": { - "type": "string" - }, "email": { "oneOf": [ { @@ -3958,6 +3955,9 @@ } ] }, + "name": { + "type": "string" + }, "nullable_attr": { "oneOf": [ { diff --git a/test/features/clone-implicit/swagger.json b/test/features/clone-implicit/swagger.json index dbe706130..b850f29fc 100644 --- a/test/features/clone-implicit/swagger.json +++ b/test/features/clone-implicit/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/clone-native/swagger.json b/test/features/clone-native/swagger.json index d7c776661..ced8fd1f2 100644 --- a/test/features/clone-native/swagger.json +++ b/test/features/clone-native/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/config-pattern/swagger.json b/test/features/config-pattern/swagger.json index 57b776a3a..cf49adac8 100644 --- a/test/features/config-pattern/swagger.json +++ b/test/features/config-pattern/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/date/swagger.json b/test/features/date/swagger.json index 8a8fc12e7..73b6ab1ff 100644 --- a/test/features/date/swagger.json +++ b/test/features/date/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/date":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDateDefined"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IDateDefined":{"type":"object","properties":{"string":{"type":"string","format":"date-time"},"date":{"type":"string","format":"date-time"},"date_with_tag":{"type":"string","format":"date-time"},"date_but_union":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"type":{"const":"Buffer"},"data":{"type":"array","items":{"type":"number"}}},"required":["type","data"]}]}},"required":["string","date","date_with_tag","date_but_union"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/date":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDateDefined"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IDateDefined":{"type":"object","properties":{"string":{"type":"string","format":"date-time"},"date":{"type":"string","format":"date-time"},"date_with_tag":{"type":"string","format":"date-time"},"date_but_union":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"type":{"const":"Buffer"},"data":{"type":"array","items":{"type":"number"}}},"required":["type","data"]}]}},"required":["string","date","date_with_tag","date_but_union"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index fc2a04b70..736bfe982 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -29,10 +29,10 @@ "devDependencies": { "rimraf": "^5.0.7", "ts-patch": "^3.2.1", - "typescript": "^5.4.2" + "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.3.2", + "@nestia/fetcher": "^3.4.2-dev.20240705", "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute-assert-json/swagger.json b/test/features/distribute-assert-json/swagger.json index 8f1b61382..45ecde152 100644 --- a/test/features/distribute-assert-json/swagger.json +++ b/test/features/distribute-assert-json/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ut](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nUpdated content","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}},"x-nestia-encrypted":true}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ut](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nUpdated content","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}},"x-nestia-encrypted":true}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index fc2a04b70..736bfe982 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -29,10 +29,10 @@ "devDependencies": { "rimraf": "^5.0.7", "ts-patch": "^3.2.1", - "typescript": "^5.4.2" + "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.3.2", + "@nestia/fetcher": "^3.4.2-dev.20240705", "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute-assert/swagger.json b/test/features/distribute-assert/swagger.json index 8a00080a9..f73e1496c 100644 --- a/test/features/distribute-assert/swagger.json +++ b/test/features/distribute-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index fc2a04b70..736bfe982 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -29,10 +29,10 @@ "devDependencies": { "rimraf": "^5.0.7", "ts-patch": "^3.2.1", - "typescript": "^5.4.2" + "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.3.2", + "@nestia/fetcher": "^3.4.2-dev.20240705", "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute-json/swagger.json b/test/features/distribute-json/swagger.json index 8a00080a9..f73e1496c 100644 --- a/test/features/distribute-json/swagger.json +++ b/test/features/distribute-json/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index fc2a04b70..736bfe982 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -29,10 +29,10 @@ "devDependencies": { "rimraf": "^5.0.7", "ts-patch": "^3.2.1", - "typescript": "^5.4.2" + "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.3.2", + "@nestia/fetcher": "^3.4.2-dev.20240705", "typia": "^6.4.0" } } \ No newline at end of file diff --git a/test/features/distribute/swagger.json b/test/features/distribute/swagger.json index 8a00080a9..f73e1496c 100644 --- a/test/features/distribute/swagger.json +++ b/test/features/distribute/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/duplicated/swagger.json b/test/features/duplicated/swagger.json index 59204a975..625af9154 100644 --- a/test/features/duplicated/swagger.json +++ b/test/features/duplicated/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/duplicated/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/multiple/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/duplicated/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/multiple/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/e2e/swagger.json b/test/features/e2e/swagger.json index 8a00080a9..f73e1496c 100644 --- a/test/features/e2e/swagger.json +++ b/test/features/e2e/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/encrypted/swagger.json b/test/features/encrypted/swagger.json index ac94e0627..a4c7e5c7e 100644 --- a/test/features/encrypted/swagger.json +++ b/test/features/encrypted/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/exception-filter/swagger.json b/test/features/exception-filter/swagger.json index 93f1bed46..d8608851b 100644 --- a/test/features/exception-filter/swagger.json +++ b/test/features/exception-filter/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/exception/typedBody":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/exception/typedManual":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/exception/{id}/typedParam":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":""}}}},"/exception/typedQuery":{"get":{"tags":[],"parameters":[{"name":"file","in":"query","schema":{"$ref":"#/components/schemas/IAttachmentFile"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAttachmentFile"}}}}}}},"/exception/internal":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/exception/typedBody":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/exception/typedManual":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/exception/{id}/typedParam":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":""}}}},"/exception/typedQuery":{"get":{"tags":[],"parameters":[{"name":"file","in":"query","schema":{"$ref":"#/components/schemas/IAttachmentFile"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAttachmentFile"}}}}}}},"/exception/internal":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/exception-with-propagate/swagger.json b/test/features/exception-with-propagate/swagger.json index 935798cd6..2360797ae 100644 --- a/test/features/exception-with-propagate/swagger.json +++ b/test/features/exception-with-propagate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/success":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"const":"INVALID_PERMISSION"}}}}}}},"/success/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}},"/fail/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]}}}}}}},"/fail/composite/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/success":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"const":"INVALID_PERMISSION"}}}}}}},"/success/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}},"/fail/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]}}}}}}},"/fail/composite/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/exception/swagger.json b/test/features/exception/swagger.json index 01c2e155e..8de24c500 100644 --- a/test/features/exception/swagger.json +++ b/test/features/exception/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/fastify/swagger.json b/test/features/fastify/swagger.json index bd247b131..951d663d9 100644 --- a/test/features/fastify/swagger.json +++ b/test/features/fastify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/headers-decompose/swagger.json b/test/features/headers-decompose/swagger.json index 8c8e28848..917d2cf79 100644 --- a/test/features/headers-decompose/swagger.json +++ b/test/features/headers-decompose/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-name":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-flags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-flags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-name":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-flags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-flags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/headers/swagger.json b/test/features/headers/swagger.json index 8d19746b7..3790653a4 100644 --- a/test/features/headers/swagger.json +++ b/test/features/headers/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"headers","in":"header","schema":{"$ref":"#/components/schemas/IHeaders"},"description":"","required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"headers","in":"header","schema":{"$ref":"#/components/schemas/IHeaders"},"description":"Headers for authentication","required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Store article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article id","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"Name in header for authentication","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-nAme":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-fLags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-fLags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"headers","in":"header","schema":{"$ref":"#/components/schemas/IHeaders"},"description":"","required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"headers","in":"header","schema":{"$ref":"#/components/schemas/IHeaders"},"description":"Headers for authentication","required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Store article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article id","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"Name in header for authentication","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-nAme":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-fLags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-fLags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/ignore/swagger.json b/test/features/ignore/swagger.json index 29a864cb8..4a1c803a3 100644 --- a/test/features/ignore/swagger.json +++ b/test/features/ignore/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"post":{"deprecated":true,"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"post":{"deprecated":true,"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/kebab/swagger.json b/test/features/kebab/swagger.json index acf356341..0024ec890 100644 --- a/test/features/kebab/swagger.json +++ b/test/features/kebab/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/ke-bab-with-dashes":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/ke-bab-with-dashes":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/method/swagger.json b/test/features/method/swagger.json index 14340da38..c4ead8149 100644 --- a/test/features/method/swagger.json +++ b/test/features/method/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/method/head":{"head":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/method/head":{"head":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/migrate/swagger.json b/test/features/migrate/swagger.json index 2568139d1..b6895246d 100644 --- a/test/features/migrate/swagger.json +++ b/test/features/migrate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.0-dev.20240701","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/multipart-form-data-fastify/swagger.json b/test/features/multipart-form-data-fastify/swagger.json index d71f6bdac..05ef9faf6 100644 --- a/test/features/multipart-form-data-fastify/swagger.json +++ b/test/features/multipart-form-data-fastify/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/multipart-form-data/swagger.json b/test/features/multipart-form-data/swagger.json index d71f6bdac..05ef9faf6 100644 --- a/test/features/multipart-form-data/swagger.json +++ b/test/features/multipart-form-data/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.3.2", + "version": "3.4.2-dev.20240705", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/non-equals/swagger.json b/test/features/non-equals/swagger.json index 60a449f1e..f5b4d36d6 100644 --- a/test/features/non-equals/swagger.json +++ b/test/features/non-equals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/request":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IRequestDto":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}},"required":["a","b"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/request":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IRequestDto":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}},"required":["a","b"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/operationId/swagger.json b/test/features/operationId/swagger.json index 8bf19200c..a599e501a 100644 --- a/test/features/operationId/swagger.json +++ b/test/features/operationId/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"operationId":"HealthController.get","parameters":[],"responses":{"200":{"description":""}}}},"/operationId/custom":{"get":{"tags":[],"operationId":"some-custom-operation-id","parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"operationId":"PerformanceController.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"operationId":"HealthController.get","parameters":[],"responses":{"200":{"description":""}}}},"/operationId/custom":{"get":{"tags":[],"operationId":"some-custom-operation-id","parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"operationId":"PerformanceController.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/param/swagger.json b/test/features/param/swagger.json index 76545a1cb..5f317493b 100644 --- a/test/features/param/swagger.json +++ b/test/features/param/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}},"/param/{value}/uuid":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/date":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"date"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/uuid_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/date_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"date"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}},"/param/{value}/uuid":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/date":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"date"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/uuid_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/date_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"date"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/plain/swagger.json b/test/features/plain/swagger.json index 24308dae4..3e65a8f37 100644 --- a/test/features/plain/swagger.json +++ b/test/features/plain/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain/string":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/template":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string","pattern":"^((something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_false_it\\?)|(something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_true_it\\?))$"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/constant":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain/string":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/template":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string","pattern":"^((something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_false_it\\?)|(something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_true_it\\?))$"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/constant":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/propagate/swagger.json b/test/features/propagate/swagger.json index ed8511c4b..5d8e34305 100644 --- a/test/features/propagate/swagger.json +++ b/test/features/propagate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/members/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember"}}},"x-nestia-encrypted":true},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/INotFound"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden.IExpired"}}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IMember.ILogin":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},"IForbidden":{"type":"object","properties":{"status":{"const":403},"message":{"type":"string"}},"required":["status","message"]},"INotFound":{"type":"object","properties":{"status":{"const":404},"message":{"type":"string"}},"required":["status","message"]},"IForbidden.IExpired":{"type":"object","properties":{"status":{"const":422},"message":{"type":"string"}},"required":["status","message"]},"IMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"nickname":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","nickname","created_at"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/members/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember"}}},"x-nestia-encrypted":true},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/INotFound"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden.IExpired"}}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IMember.ILogin":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},"IForbidden":{"type":"object","properties":{"status":{"const":403},"message":{"type":"string"}},"required":["status","message"]},"INotFound":{"type":"object","properties":{"status":{"const":404},"message":{"type":"string"}},"required":["status","message"]},"IForbidden.IExpired":{"type":"object","properties":{"status":{"const":422},"message":{"type":"string"}},"required":["status","message"]},"IMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"nickname":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","nickname","created_at"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/package.json b/test/package.json index e68b92e7e..33827ae80 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/test", - "version": "3.4.1", + "version": "3.4.2", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.4.1", + "@nestia/sdk": "^3.4.2", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.4.1", + "@nestia/core": "^3.4.2", "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.4.1", + "@nestia/fetcher": "^3.4.2", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", diff --git a/website/pages/docs/index.mdx b/website/pages/docs/index.mdx index 636170307..f26d7aa5b 100644 --- a/website/pages/docs/index.mdx +++ b/website/pages/docs/index.mdx @@ -55,7 +55,7 @@ Nestia is a set of helper libraries for [NestJS](https://docs.nestjs.com), suppo - Mockup Simulator for client developers - Automatic E2E test functions generator - `@nestia/e2e` - - Test program utilizng e2e test functions + - Test program utilizing e2e test functions - Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor From 01d44ed0cca52e295552c53d1c9ec04a5c67694d Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sat, 6 Jul 2024 01:29:44 +0900 Subject: [PATCH 007/204] Fix bug of SwaggerGenerator tag handling --- package.json | 2 +- packages/core/package.json | 6 +++--- packages/fetcher/package.json | 2 +- packages/sdk/package.json | 10 +++++----- packages/sdk/src/generates/SdkGenerator.ts | 11 +++-------- packages/sdk/src/generates/SwaggerGenerator.ts | 1 + test/features/beautify-4/swagger.json | 2 +- test/features/beautify-false/swagger.json | 2 +- test/features/beautify/swagger.json | 2 +- test/package.json | 8 ++++---- 10 files changed, 21 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 5ae0d8b86..4d947897c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.4.2", + "version": "3.4.3", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index 1418c5cd7..ae9da0d22 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.4.2", + "version": "3.4.3", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.2", + "@nestia/fetcher": "^3.4.3", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.0", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.2", + "@nestia/fetcher": ">=3.4.3", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index edd43bf2e..3e839b0e0 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.4.2", + "version": "3.4.3", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 7d66ce82d..e1a3784db 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.4.2", + "version": "3.4.3", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.2", - "@nestia/core": "^3.4.2", + "@nestia/fetcher": "^3.4.3", + "@nestia/core": "^3.4.3", "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.4.0" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.2", - "@nestia/core": ">=3.4.2", + "@nestia/fetcher": ">=3.4.3", + "@nestia/core": ">=3.4.3", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/generates/SdkGenerator.ts b/packages/sdk/src/generates/SdkGenerator.ts index bd7f0a922..7882108f3 100644 --- a/packages/sdk/src/generates/SdkGenerator.ts +++ b/packages/sdk/src/generates/SdkGenerator.ts @@ -32,14 +32,9 @@ export namespace SdkGenerator { lazyProperties: [], lazySchemas: [], errors, - swagger: { - openapi: "3.1.0", - paths: {}, - components: { - schemas: {}, - }, - "x-samchon-emended": true, - }, + swagger: await SwaggerGenerator.initialize({ + output: "", + }), }); for (const r of routes) if (r.protocol === "http") validator(r); if (errors.length) { diff --git a/packages/sdk/src/generates/SwaggerGenerator.ts b/packages/sdk/src/generates/SwaggerGenerator.ts index 7969cb297..1828058f7 100644 --- a/packages/sdk/src/generates/SwaggerGenerator.ts +++ b/packages/sdk/src/generates/SwaggerGenerator.ts @@ -412,6 +412,7 @@ export namespace SwaggerGenerator { ...route.swaggerTags, ...getJsDocTexts("tag").map((tag) => tag.split(" ")[0]), ]); + props.swagger.tags ??= []; for (const tag of tagSet) if (props.swagger.tags!.find((elem) => elem.name === tag) === undefined) props.swagger.tags!.push({ name: tag }); diff --git a/test/features/beautify-4/swagger.json b/test/features/beautify-4/swagger.json index f2bb67a1e..4a2951b33 100644 --- a/test/features/beautify-4/swagger.json +++ b/test/features/beautify-4/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.4.2", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/beautify-false/swagger.json b/test/features/beautify-false/swagger.json index 31fd02b4b..4c9d42a53 100644 --- a/test/features/beautify-false/swagger.json +++ b/test/features/beautify-false/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify/swagger.json b/test/features/beautify/swagger.json index 7e1e7be9b..11439af9f 100644 --- a/test/features/beautify/swagger.json +++ b/test/features/beautify/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.4.2", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/package.json b/test/package.json index 33827ae80..9c352418c 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/test", - "version": "3.4.2", + "version": "3.4.3", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.4.2", + "@nestia/sdk": "^3.4.3", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.4.2", + "@nestia/core": "^3.4.3", "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.4.2", + "@nestia/fetcher": "^3.4.3", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From 8b91937f150d5a6991e60d148db2e96263ac6962 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 7 Jul 2024 14:38:11 +0900 Subject: [PATCH 008/204] Close #943: `config.swagger.decompose` to be default `true`. --- package.json | 2 +- packages/core/package.json | 6 +- packages/fetcher/package.json | 2 +- packages/sdk/package.json | 10 +- packages/sdk/src/INestiaConfig.ts | 14 +- .../internal/SwaggerSchemaGenerator.ts | 2 +- .../query-decompose-false/nestia.config.ts | 16 ++ .../src/Backend.ts | 0 .../src/api/HttpError.ts | 0 .../src/api/IConnection.ts | 0 .../src/api/Primitive.ts | 0 .../src/api/functional/index.ts | 0 .../src/api/functional/query/index.ts | 0 .../src/api/index.ts | 0 .../src/api/module.ts | 0 .../src/api/structures/INestQuery.ts | 0 .../src/api/structures/IQuery.ts | 0 .../src/controllers/QueryController.ts | 0 .../features/api/test_api_query_composite.ts | 0 .../features/api/test_api_query_individual.ts | 0 .../features/api/test_api_query_invalid.ts | 0 .../test/features/api/test_api_query_nest.ts | 0 .../test/features/api/test_api_query_null.ts | 0 .../test/features/api/test_api_query_typed.ts | 0 .../src/test/features/test_swagger.ts | 13 ++ .../src/test/index.ts | 0 .../query-decompose-false/swagger.json | 1 + .../tsconfig.json | 0 .../nestia.config.ts | 0 .../query-decompose-true/src/Backend.ts | 27 +++ .../query-decompose-true/src/api/HttpError.ts | 1 + .../src/api/IConnection.ts | 1 + .../query-decompose-true/src/api/Primitive.ts | 1 + .../src/api/functional/index.ts | 7 + .../src/api/functional/query/index.ts | 192 ++++++++++++++++++ .../query-decompose-true/src/api/index.ts | 4 + .../query-decompose-true/src/api/module.ts | 5 + .../src/api/structures/INestQuery.ts | 6 + .../src/api/structures/IQuery.ts | 6 + .../src/controllers/QueryController.ts | 39 ++++ .../features/api/test_api_query_composite.ts | 23 +++ .../features/api/test_api_query_individual.ts | 16 ++ .../features/api/test_api_query_invalid.ts | 16 ++ .../test/features/api/test_api_query_nest.ts | 24 +++ .../test/features/api/test_api_query_null.ts | 19 ++ .../test/features/api/test_api_query_typed.ts | 19 ++ .../src/test/features/test_swagger.ts | 0 .../query-decompose-true/src/test/index.ts | 40 ++++ .../query-decompose-true/swagger.json | 1 + .../query-decompose-true/tsconfig.json | 98 +++++++++ test/features/query-decompose/swagger.json | 1 - test/features/query/swagger.json | 2 +- test/package.json | 8 +- 53 files changed, 602 insertions(+), 20 deletions(-) create mode 100644 test/features/query-decompose-false/nestia.config.ts rename test/features/{query-decompose => query-decompose-false}/src/Backend.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/HttpError.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/IConnection.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/Primitive.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/functional/index.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/functional/query/index.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/index.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/module.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/structures/INestQuery.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/api/structures/IQuery.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/controllers/QueryController.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/test/features/api/test_api_query_composite.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/test/features/api/test_api_query_individual.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/test/features/api/test_api_query_invalid.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/test/features/api/test_api_query_nest.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/test/features/api/test_api_query_null.ts (100%) rename test/features/{query-decompose => query-decompose-false}/src/test/features/api/test_api_query_typed.ts (100%) create mode 100644 test/features/query-decompose-false/src/test/features/test_swagger.ts rename test/features/{query-decompose => query-decompose-false}/src/test/index.ts (100%) create mode 100644 test/features/query-decompose-false/swagger.json rename test/features/{query-decompose => query-decompose-false}/tsconfig.json (100%) rename test/features/{query-decompose => query-decompose-true}/nestia.config.ts (100%) create mode 100644 test/features/query-decompose-true/src/Backend.ts create mode 100644 test/features/query-decompose-true/src/api/HttpError.ts create mode 100644 test/features/query-decompose-true/src/api/IConnection.ts create mode 100644 test/features/query-decompose-true/src/api/Primitive.ts create mode 100644 test/features/query-decompose-true/src/api/functional/index.ts create mode 100644 test/features/query-decompose-true/src/api/functional/query/index.ts create mode 100644 test/features/query-decompose-true/src/api/index.ts create mode 100644 test/features/query-decompose-true/src/api/module.ts create mode 100644 test/features/query-decompose-true/src/api/structures/INestQuery.ts create mode 100644 test/features/query-decompose-true/src/api/structures/IQuery.ts create mode 100644 test/features/query-decompose-true/src/controllers/QueryController.ts create mode 100644 test/features/query-decompose-true/src/test/features/api/test_api_query_composite.ts create mode 100644 test/features/query-decompose-true/src/test/features/api/test_api_query_individual.ts create mode 100644 test/features/query-decompose-true/src/test/features/api/test_api_query_invalid.ts create mode 100644 test/features/query-decompose-true/src/test/features/api/test_api_query_nest.ts create mode 100644 test/features/query-decompose-true/src/test/features/api/test_api_query_null.ts create mode 100644 test/features/query-decompose-true/src/test/features/api/test_api_query_typed.ts rename test/features/{query-decompose => query-decompose-true}/src/test/features/test_swagger.ts (100%) create mode 100644 test/features/query-decompose-true/src/test/index.ts create mode 100644 test/features/query-decompose-true/swagger.json create mode 100644 test/features/query-decompose-true/tsconfig.json delete mode 100644 test/features/query-decompose/swagger.json diff --git a/package.json b/package.json index 4d947897c..2ba9096a7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.4.3", + "version": "3.5.0-dev.20240706", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index ae9da0d22..f6a0e630f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.4.3", + "version": "3.5.0-dev.20240706", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.3", + "@nestia/fetcher": "^3.5.0-dev.20240706", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.0", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.3", + "@nestia/fetcher": ">=3.5.0-dev.20240706", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 3e839b0e0..1d77edb0a 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.4.3", + "version": "3.5.0-dev.20240706", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e1a3784db..fd773edb0 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.4.3", + "version": "3.5.0-dev.20240706", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.3", - "@nestia/core": "^3.4.3", + "@nestia/fetcher": "^3.5.0-dev.20240706", + "@nestia/core": "^3.5.0-dev.20240706", "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.4.0" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.3", - "@nestia/core": ">=3.4.3", + "@nestia/fetcher": ">=3.5.0-dev.20240706", + "@nestia/core": ">=3.5.0-dev.20240706", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/INestiaConfig.ts b/packages/sdk/src/INestiaConfig.ts index 62235d440..cd51ba370 100644 --- a/packages/sdk/src/INestiaConfig.ts +++ b/packages/sdk/src/INestiaConfig.ts @@ -1,7 +1,7 @@ import type { INestApplication } from "@nestjs/common"; +import { OpenApi } from "@samchon/openapi"; import type { INormalizedInput } from "./structures/INormalizedInput"; -import { OpenApi } from "@samchon/openapi"; /** * Definition for the `nestia.config.ts` file. @@ -242,12 +242,20 @@ export namespace INestiaConfig { * Decompose query DTO. * * If you configure this property to be `true`, the query DTO would be decomposed - * into individual query parameters per each property. + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. * - * @default false + * @default true */ decompose?: boolean; + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ operationId?(props: { class: string; function: string; diff --git a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts index 16305aed0..5e97e0db8 100644 --- a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts +++ b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts @@ -300,7 +300,7 @@ export namespace SwaggerSchemaGenerator { ); return [decoded]; } else if ( - props.config.decompose !== true || + props.config.decompose === false || result.data.objects.length === 0 ) return [decoded]; diff --git a/test/features/query-decompose-false/nestia.config.ts b/test/features/query-decompose-false/nestia.config.ts new file mode 100644 index 000000000..e74a03fc4 --- /dev/null +++ b/test/features/query-decompose-false/nestia.config.ts @@ -0,0 +1,16 @@ +import { INestiaConfig } from "@nestia/sdk"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + output: "src/api", + swagger: { + output: "swagger.json", + decompose: false, + security: { + bearer: { + type: "apiKey", + }, + }, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/query-decompose/src/Backend.ts b/test/features/query-decompose-false/src/Backend.ts similarity index 100% rename from test/features/query-decompose/src/Backend.ts rename to test/features/query-decompose-false/src/Backend.ts diff --git a/test/features/query-decompose/src/api/HttpError.ts b/test/features/query-decompose-false/src/api/HttpError.ts similarity index 100% rename from test/features/query-decompose/src/api/HttpError.ts rename to test/features/query-decompose-false/src/api/HttpError.ts diff --git a/test/features/query-decompose/src/api/IConnection.ts b/test/features/query-decompose-false/src/api/IConnection.ts similarity index 100% rename from test/features/query-decompose/src/api/IConnection.ts rename to test/features/query-decompose-false/src/api/IConnection.ts diff --git a/test/features/query-decompose/src/api/Primitive.ts b/test/features/query-decompose-false/src/api/Primitive.ts similarity index 100% rename from test/features/query-decompose/src/api/Primitive.ts rename to test/features/query-decompose-false/src/api/Primitive.ts diff --git a/test/features/query-decompose/src/api/functional/index.ts b/test/features/query-decompose-false/src/api/functional/index.ts similarity index 100% rename from test/features/query-decompose/src/api/functional/index.ts rename to test/features/query-decompose-false/src/api/functional/index.ts diff --git a/test/features/query-decompose/src/api/functional/query/index.ts b/test/features/query-decompose-false/src/api/functional/query/index.ts similarity index 100% rename from test/features/query-decompose/src/api/functional/query/index.ts rename to test/features/query-decompose-false/src/api/functional/query/index.ts diff --git a/test/features/query-decompose/src/api/index.ts b/test/features/query-decompose-false/src/api/index.ts similarity index 100% rename from test/features/query-decompose/src/api/index.ts rename to test/features/query-decompose-false/src/api/index.ts diff --git a/test/features/query-decompose/src/api/module.ts b/test/features/query-decompose-false/src/api/module.ts similarity index 100% rename from test/features/query-decompose/src/api/module.ts rename to test/features/query-decompose-false/src/api/module.ts diff --git a/test/features/query-decompose/src/api/structures/INestQuery.ts b/test/features/query-decompose-false/src/api/structures/INestQuery.ts similarity index 100% rename from test/features/query-decompose/src/api/structures/INestQuery.ts rename to test/features/query-decompose-false/src/api/structures/INestQuery.ts diff --git a/test/features/query-decompose/src/api/structures/IQuery.ts b/test/features/query-decompose-false/src/api/structures/IQuery.ts similarity index 100% rename from test/features/query-decompose/src/api/structures/IQuery.ts rename to test/features/query-decompose-false/src/api/structures/IQuery.ts diff --git a/test/features/query-decompose/src/controllers/QueryController.ts b/test/features/query-decompose-false/src/controllers/QueryController.ts similarity index 100% rename from test/features/query-decompose/src/controllers/QueryController.ts rename to test/features/query-decompose-false/src/controllers/QueryController.ts diff --git a/test/features/query-decompose/src/test/features/api/test_api_query_composite.ts b/test/features/query-decompose-false/src/test/features/api/test_api_query_composite.ts similarity index 100% rename from test/features/query-decompose/src/test/features/api/test_api_query_composite.ts rename to test/features/query-decompose-false/src/test/features/api/test_api_query_composite.ts diff --git a/test/features/query-decompose/src/test/features/api/test_api_query_individual.ts b/test/features/query-decompose-false/src/test/features/api/test_api_query_individual.ts similarity index 100% rename from test/features/query-decompose/src/test/features/api/test_api_query_individual.ts rename to test/features/query-decompose-false/src/test/features/api/test_api_query_individual.ts diff --git a/test/features/query-decompose/src/test/features/api/test_api_query_invalid.ts b/test/features/query-decompose-false/src/test/features/api/test_api_query_invalid.ts similarity index 100% rename from test/features/query-decompose/src/test/features/api/test_api_query_invalid.ts rename to test/features/query-decompose-false/src/test/features/api/test_api_query_invalid.ts diff --git a/test/features/query-decompose/src/test/features/api/test_api_query_nest.ts b/test/features/query-decompose-false/src/test/features/api/test_api_query_nest.ts similarity index 100% rename from test/features/query-decompose/src/test/features/api/test_api_query_nest.ts rename to test/features/query-decompose-false/src/test/features/api/test_api_query_nest.ts diff --git a/test/features/query-decompose/src/test/features/api/test_api_query_null.ts b/test/features/query-decompose-false/src/test/features/api/test_api_query_null.ts similarity index 100% rename from test/features/query-decompose/src/test/features/api/test_api_query_null.ts rename to test/features/query-decompose-false/src/test/features/api/test_api_query_null.ts diff --git a/test/features/query-decompose/src/test/features/api/test_api_query_typed.ts b/test/features/query-decompose-false/src/test/features/api/test_api_query_typed.ts similarity index 100% rename from test/features/query-decompose/src/test/features/api/test_api_query_typed.ts rename to test/features/query-decompose-false/src/test/features/api/test_api_query_typed.ts diff --git a/test/features/query-decompose-false/src/test/features/test_swagger.ts b/test/features/query-decompose-false/src/test/features/test_swagger.ts new file mode 100644 index 000000000..2c9c92f53 --- /dev/null +++ b/test/features/query-decompose-false/src/test/features/test_swagger.ts @@ -0,0 +1,13 @@ +import { TestValidator } from "@nestia/e2e"; + +export const test_swagger = async () => { + const content = await import("../../../swagger.json"); + TestValidator.equals("query")({ + name: "query", + in: "query", + schema: { $ref: "#/components/schemas/IQuery" }, + required: true, + })( + content.paths["/query/typed"].get.parameters.find((p) => p.in === "query")!, + ); +}; diff --git a/test/features/query-decompose/src/test/index.ts b/test/features/query-decompose-false/src/test/index.ts similarity index 100% rename from test/features/query-decompose/src/test/index.ts rename to test/features/query-decompose-false/src/test/index.ts diff --git a/test/features/query-decompose-false/swagger.json b/test/features/query-decompose-false/swagger.json new file mode 100644 index 000000000..5bd123c1c --- /dev/null +++ b/test/features/query-decompose-false/swagger.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240706","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-decompose/tsconfig.json b/test/features/query-decompose-false/tsconfig.json similarity index 100% rename from test/features/query-decompose/tsconfig.json rename to test/features/query-decompose-false/tsconfig.json diff --git a/test/features/query-decompose/nestia.config.ts b/test/features/query-decompose-true/nestia.config.ts similarity index 100% rename from test/features/query-decompose/nestia.config.ts rename to test/features/query-decompose-true/nestia.config.ts diff --git a/test/features/query-decompose-true/src/Backend.ts b/test/features/query-decompose-true/src/Backend.ts new file mode 100644 index 000000000..be2c2d840 --- /dev/null +++ b/test/features/query-decompose-true/src/Backend.ts @@ -0,0 +1,27 @@ +import core from "@nestia/core"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +export class Backend { + private application_?: INestApplication; + + public async open(): Promise { + this.application_ = await NestFactory.create( + await core.EncryptedModule.dynamic(__dirname + "/controllers", { + key: "A".repeat(32), + iv: "B".repeat(16), + }), + { logger: false }, + ); + await this.application_.listen(37_000); + } + + public async close(): Promise { + if (this.application_ === undefined) return; + + const app = this.application_; + await app.close(); + + delete this.application_; + } +} diff --git a/test/features/query-decompose-true/src/api/HttpError.ts b/test/features/query-decompose-true/src/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/test/features/query-decompose-true/src/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/test/features/query-decompose-true/src/api/IConnection.ts b/test/features/query-decompose-true/src/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/test/features/query-decompose-true/src/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/test/features/query-decompose-true/src/api/Primitive.ts b/test/features/query-decompose-true/src/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/test/features/query-decompose-true/src/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/test/features/query-decompose-true/src/api/functional/index.ts b/test/features/query-decompose-true/src/api/functional/index.ts new file mode 100644 index 000000000..dc43077be --- /dev/null +++ b/test/features/query-decompose-true/src/api/functional/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as query from "./query"; diff --git a/test/features/query-decompose-true/src/api/functional/query/index.ts b/test/features/query-decompose-true/src/api/functional/query/index.ts new file mode 100644 index 000000000..c75b70ed1 --- /dev/null +++ b/test/features/query-decompose-true/src/api/functional/query/index.ts @@ -0,0 +1,192 @@ +/** + * @packageDocumentation + * @module api.functional.query + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Resolved, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +import type { INestQuery } from "../../structures/INestQuery"; +import type { IQuery } from "../../structures/IQuery"; + +/** + * @controller QueryController.typed + * @path GET /query/typed + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function typed( + connection: IConnection, + query: typed.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...typed.METADATA, + template: typed.METADATA.path, + path: typed.path(query), + }); +} +export namespace typed { + export type Query = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/query/typed", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (query: typed.Query) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = "/query/typed"; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller QueryController.nest + * @path GET /query/nest + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function nest( + connection: IConnection, + query: nest.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...nest.METADATA, + template: nest.METADATA.path, + path: nest.path(query), + }); +} +export namespace nest { + export type Query = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/query/nest", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (query: nest.Query) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = "/query/nest"; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller QueryController.individual + * @path GET /query/individual + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function individual( + connection: IConnection, + id: string, +): Promise { + return PlainFetcher.fetch(connection, { + ...individual.METADATA, + template: individual.METADATA.path, + path: individual.path(id), + }); +} +export namespace individual { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/query/individual", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (id: string) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries({ + id, + } as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = "/query/individual"; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller QueryController.composite + * @path GET /query/composite + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function composite( + connection: IConnection, + atomic: string, + query: composite.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...composite.METADATA, + template: composite.METADATA.path, + path: composite.path(atomic, query), + }); +} +export namespace composite { + export type Query = Resolved>; + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/query/composite", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (atomic: string, query: composite.Query) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries({ + ...query, + atomic, + } as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = "/query/composite"; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} diff --git a/test/features/query-decompose-true/src/api/index.ts b/test/features/query-decompose-true/src/api/index.ts new file mode 100644 index 000000000..1705f43c8 --- /dev/null +++ b/test/features/query-decompose-true/src/api/index.ts @@ -0,0 +1,4 @@ +import * as api from "./module"; + +export * from "./module"; +export default api; diff --git a/test/features/query-decompose-true/src/api/module.ts b/test/features/query-decompose-true/src/api/module.ts new file mode 100644 index 000000000..dbb6e9a51 --- /dev/null +++ b/test/features/query-decompose-true/src/api/module.ts @@ -0,0 +1,5 @@ +export type * from "./IConnection"; +export type * from "./Primitive"; +export * from "./HttpError"; + +export * as functional from "./functional"; diff --git a/test/features/query-decompose-true/src/api/structures/INestQuery.ts b/test/features/query-decompose-true/src/api/structures/INestQuery.ts new file mode 100644 index 000000000..124ba431b --- /dev/null +++ b/test/features/query-decompose-true/src/api/structures/INestQuery.ts @@ -0,0 +1,6 @@ +export interface INestQuery { + limit?: `${number}`; + enforce: `${boolean}`; + atomic: string; + values: string[]; +} diff --git a/test/features/query-decompose-true/src/api/structures/IQuery.ts b/test/features/query-decompose-true/src/api/structures/IQuery.ts new file mode 100644 index 000000000..6d87e0d0b --- /dev/null +++ b/test/features/query-decompose-true/src/api/structures/IQuery.ts @@ -0,0 +1,6 @@ +export interface IQuery { + limit?: number; + enforce: boolean; + values: string[]; + atomic: string | null; +} diff --git a/test/features/query-decompose-true/src/controllers/QueryController.ts b/test/features/query-decompose-true/src/controllers/QueryController.ts new file mode 100644 index 000000000..59bbdf258 --- /dev/null +++ b/test/features/query-decompose-true/src/controllers/QueryController.ts @@ -0,0 +1,39 @@ +import { TypedQuery, TypedRoute } from "@nestia/core"; +import { Controller, Query } from "@nestjs/common"; + +import { INestQuery } from "@api/lib/structures/INestQuery"; +import { IQuery } from "@api/lib/structures/IQuery"; + +@Controller("query") +export class QueryController { + @TypedRoute.Get("typed") + public async typed(@TypedQuery() query: IQuery): Promise { + return query; + } + + @TypedRoute.Get("nest") + public async nest(@Query() query: INestQuery): Promise { + return { + limit: query.limit !== undefined ? Number(query.limit) : undefined, + enforce: query.enforce === "true", + atomic: query.atomic === "null" ? null : query.atomic, + values: query.values, + }; + } + + @TypedRoute.Get("individual") + public async individual(@Query("id") id: string): Promise { + return id; + } + + @TypedRoute.Get("composite") + public async composite( + @Query("atomic") atomic: string, + @TypedQuery() query: Omit, + ): Promise { + return { + ...query, + atomic, + }; + } +} diff --git a/test/features/query-decompose-true/src/test/features/api/test_api_query_composite.ts b/test/features/query-decompose-true/src/test/features/api/test_api_query_composite.ts new file mode 100644 index 000000000..16e719916 --- /dev/null +++ b/test/features/query-decompose-true/src/test/features/api/test_api_query_composite.ts @@ -0,0 +1,23 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IQuery } from "@api/lib/structures/IQuery"; + +export const test_api_query_composite = async ( + connection: api.IConnection, +): Promise => { + const atomic: string = "atomic"; + const input: Omit = { + limit: 10, + enforce: true, + values: ["value-1", "value-2"], + }; + const result: IQuery = await api.functional.query.composite( + connection, + atomic, + input, + ); + typia.assertEquals(result); + TestValidator.equals("composite")(result)({ ...input, atomic }); +}; diff --git a/test/features/query-decompose-true/src/test/features/api/test_api_query_individual.ts b/test/features/query-decompose-true/src/test/features/api/test_api_query_individual.ts new file mode 100644 index 000000000..92e0adc04 --- /dev/null +++ b/test/features/query-decompose-true/src/test/features/api/test_api_query_individual.ts @@ -0,0 +1,16 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; + +export const test_api_query_nest = async ( + connection: api.IConnection, +): Promise => { + const input: string = "some-value"; + const value: string = await api.functional.query.individual( + connection, + "some-value", + ); + typia.assertEquals(value); + TestValidator.equals("individual")(input)(value); +}; diff --git a/test/features/query-decompose-true/src/test/features/api/test_api_query_invalid.ts b/test/features/query-decompose-true/src/test/features/api/test_api_query_invalid.ts new file mode 100644 index 000000000..0ada32bdb --- /dev/null +++ b/test/features/query-decompose-true/src/test/features/api/test_api_query_invalid.ts @@ -0,0 +1,16 @@ +import { TestValidator } from "@nestia/e2e"; + +import api from "@api"; + +export const test_api_query_invalid = async ( + connection: api.IConnection, +): Promise => { + TestValidator.httpError("invalid")(400)(() => + api.functional.query.typed(connection, { + limit: 10, + enforce: "something" as any, + values: ["a", "b", "c"], + atomic: "atomic", + }), + ); +}; diff --git a/test/features/query-decompose-true/src/test/features/api/test_api_query_nest.ts b/test/features/query-decompose-true/src/test/features/api/test_api_query_nest.ts new file mode 100644 index 000000000..0178586de --- /dev/null +++ b/test/features/query-decompose-true/src/test/features/api/test_api_query_nest.ts @@ -0,0 +1,24 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IQuery } from "@api/lib/structures/IQuery"; + +export const test_api_query_nest = async ( + connection: api.IConnection, +): Promise => { + const input: IQuery = { + limit: 10, + enforce: true, + atomic: "atomic", + values: ["a", "b", "c"], + }; + const result: IQuery = await api.functional.query.nest(connection, { + ...input, + limit: input.limit ? `${input.limit}` : undefined, + enforce: input.enforce ? "true" : "false", + atomic: input.atomic ? input.atomic : "null", + }); + typia.assertEquals(result); + TestValidator.equals("nest")(input)(result); +}; diff --git a/test/features/query-decompose-true/src/test/features/api/test_api_query_null.ts b/test/features/query-decompose-true/src/test/features/api/test_api_query_null.ts new file mode 100644 index 000000000..4adc811a1 --- /dev/null +++ b/test/features/query-decompose-true/src/test/features/api/test_api_query_null.ts @@ -0,0 +1,19 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IQuery } from "@api/lib/structures/IQuery"; + +export const test_api_query_null = async ( + connection: api.IConnection, +): Promise => { + const input: IQuery = { + limit: 10, + enforce: true, + atomic: null, + values: ["a", "b", "c"], + }; + const result: IQuery = await api.functional.query.typed(connection, input); + typia.assertEquals(result); + TestValidator.equals("null")(input)(result); +}; diff --git a/test/features/query-decompose-true/src/test/features/api/test_api_query_typed.ts b/test/features/query-decompose-true/src/test/features/api/test_api_query_typed.ts new file mode 100644 index 000000000..4c20f0553 --- /dev/null +++ b/test/features/query-decompose-true/src/test/features/api/test_api_query_typed.ts @@ -0,0 +1,19 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IQuery } from "@api/lib/structures/IQuery"; + +export const test_api_query_typed = async ( + connection: api.IConnection, +): Promise => { + const input: IQuery = { + limit: 10, + enforce: true, + atomic: "atomic", + values: ["a", "b", "c"], + }; + const result: IQuery = await api.functional.query.typed(connection, input); + typia.assertEquals(result); + TestValidator.equals("typed")(input)(result); +}; diff --git a/test/features/query-decompose/src/test/features/test_swagger.ts b/test/features/query-decompose-true/src/test/features/test_swagger.ts similarity index 100% rename from test/features/query-decompose/src/test/features/test_swagger.ts rename to test/features/query-decompose-true/src/test/features/test_swagger.ts diff --git a/test/features/query-decompose-true/src/test/index.ts b/test/features/query-decompose-true/src/test/index.ts new file mode 100644 index 000000000..3e74f8d31 --- /dev/null +++ b/test/features/query-decompose-true/src/test/index.ts @@ -0,0 +1,40 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + })(`${__dirname}/features`); + await server.close(); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/query-decompose-true/swagger.json b/test/features/query-decompose-true/swagger.json new file mode 100644 index 000000000..f74265470 --- /dev/null +++ b/test/features/query-decompose-true/swagger.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240706","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-decompose-true/tsconfig.json b/test/features/query-decompose-true/tsconfig.json new file mode 100644 index 000000000..ef75df78e --- /dev/null +++ b/test/features/query-decompose-true/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + } + } \ No newline at end of file diff --git a/test/features/query-decompose/swagger.json b/test/features/query-decompose/swagger.json deleted file mode 100644 index 7cf735f6a..000000000 --- a/test/features/query-decompose/swagger.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query/swagger.json b/test/features/query/swagger.json index d318f96bd..90666712b 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240706","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/package.json b/test/package.json index 9c352418c..2c73cc28b 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/test", - "version": "3.4.3", + "version": "3.5.0-dev.20240706", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.4.3", + "@nestia/sdk": "^3.5.0-dev.20240706", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.4.3", + "@nestia/core": "^3.5.0-dev.20240706", "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.4.3", + "@nestia/fetcher": "^3.5.0-dev.20240706", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From 7d3b190021334aecc75d9398cfcd8d60859bd644 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 7 Jul 2024 15:27:38 +0900 Subject: [PATCH 009/204] feat/docs: detailed options of swagger generator of `@nestia/sdk`. --- website/pages/docs/sdk/swagger.mdx | 126 ++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 1 deletion(-) diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index 54a261e44..7d424bc40 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -334,12 +334,20 @@ export namespace INestiaConfig { * Decompose query DTO. * * If you configure this property to be `true`, the query DTO would be decomposed - * into individual query parameters per each property. + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. * * @default false */ decompose?: boolean; + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ operationId?(props: { class: string; function: string; @@ -608,6 +616,122 @@ export default NESTIA_CONFIG; +Additionally, you can configure the `swagger` property in the `nestia.config.ts` file. + + - `swagger.beautify`: Whether to beautify JSON content or not. + - `swagger.info`: API information. If not configured, `package.json` content be utilized instead. + - `swagger.servers`: List of server addresses. + - `swagger.security`: Security schemes. + - `swagger.tags`: List of tag names with description. + - `swagger.decompose`: Whether to decompose query DTO as individual parameters. + - `swagger.operationId`: Operation ID genereator. + +
+ See detailed options: +
+```typescript filename="INestiaConfig.ts" showLineNumbers {15-96} +export namespace INestiaConfig { + /** + * Building `swagger.json` is also possible. + */ + export interface ISwaggerConfig { + /** + * Output path of the `swagger.json`. + * + * If you've configured only directory, the file name would be the `swagger.json`. + * Otherwise you've configured the full path with file name and extension, the + * `swagger.json` file would be renamed to it. + */ + output: string; + + /** + * Whether to beautify JSON content or not. + * + * If you configure this property to be `true`, the `swagger.json` file would + * be beautified with indentation (2 spaces) and line breaks. If you configure + * numeric value instead, the indentation would be specified by the number. + * + * @default false + */ + beautify?: boolean | number; + + /** + * Whether to include additional information or not. + * + * If configured to be `true`, those properties would be added into each + * API endpoinnt. + * + * - `x-nestia-method` + * - `x-nestia-namespace` + * ` `x-nestia-jsDocTags` + * + * @default false + */ + additional?: boolean; + + /** + * API information. + * + * If omitted, `package.json` content would be used instead. + */ + info?: Partial; + + /** + * List of server addresses. + */ + servers?: OpenApi.IServer[]; + + /** + * Security schemes. + * + * When generating `swagger.json` file through `nestia`, if your controllers or + * theirs methods have a security key which is not enrolled in here property, + * it would be an error. + */ + security?: Record; + + /** + * List of tag names with description. + * + * It is possible to omit this property or skip some tag name even if + * the tag name is used in the API routes. In that case, the tag name + * would be used without description. + * + * Of course, if you've written a comment like `@tag {name} {descrition}`, + * you can entirely replace this property specification. + */ + tags?: OpenApi.IDocument.ITag[]; + + /** + * Decompose query DTO. + * + * If you configure this property to be `true`, the query DTO would be decomposed + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. + * + * @default true + */ + decompose?: boolean; + + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ + operationId?(props: { + class: string; + function: string; + method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; + path: string; + }): string; + } +} +``` + +
+ From 49c712f80ec3c8c18e8e96b43f70f151709d2e25 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 7 Jul 2024 17:34:51 +0900 Subject: [PATCH 010/204] Fix `INestiaConfig` type to be latest in docs --- packages/sdk/src/INestiaConfig.ts | 19 +++--- website/pages/docs/e2e/_meta.json | 2 +- website/pages/docs/sdk/e2e.mdx | 35 +++++++--- website/pages/docs/sdk/sdk.mdx | 33 +++++++--- website/pages/docs/sdk/simulator.mdx | 35 +++++++--- website/pages/docs/sdk/swagger.mdx | 98 +++++++++++----------------- 6 files changed, 127 insertions(+), 95 deletions(-) diff --git a/packages/sdk/src/INestiaConfig.ts b/packages/sdk/src/INestiaConfig.ts index 62235d440..38476fc10 100644 --- a/packages/sdk/src/INestiaConfig.ts +++ b/packages/sdk/src/INestiaConfig.ts @@ -1,7 +1,5 @@ import type { INestApplication } from "@nestjs/common"; - -import type { INormalizedInput } from "./structures/INormalizedInput"; -import { OpenApi } from "@samchon/openapi"; +import type { OpenApi } from "@samchon/openapi"; /** * Definition for the `nestia.config.ts` file. @@ -144,11 +142,6 @@ export interface INestiaConfig { * @default false */ json?: boolean; - - /** - * @internal - */ - normalized?: INormalizedInput; } export namespace INestiaConfig { /** @@ -242,12 +235,20 @@ export namespace INestiaConfig { * Decompose query DTO. * * If you configure this property to be `true`, the query DTO would be decomposed - * into individual query parameters per each property. + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. * * @default false */ decompose?: boolean; + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ operationId?(props: { class: string; function: string; diff --git a/website/pages/docs/e2e/_meta.json b/website/pages/docs/e2e/_meta.json index 3f0bdb66e..7d9de8866 100644 --- a/website/pages/docs/e2e/_meta.json +++ b/website/pages/docs/e2e/_meta.json @@ -1,5 +1,5 @@ { "why": "Why E2E Test?", - "development": "Test Program Development", + "development": "Test Program Develop", "benchmark": "Performance Benchmark" } \ No newline at end of file diff --git a/website/pages/docs/sdk/e2e.mdx b/website/pages/docs/sdk/e2e.mdx index 7cc61fd77..317691804 100644 --- a/website/pages/docs/sdk/e2e.mdx +++ b/website/pages/docs/sdk/e2e.mdx @@ -98,12 +98,9 @@ export default NESTIA_CONFIG; ``` -```typescript copy filename="INestiaConfig.ts" showLineNumbers {70-79} +```typescript copy filename="INestiaConfig.ts" showLineNumbers {67-76} import type { INestApplication } from "@nestjs/common"; - -import type { ISwagger } from "./structures/ISwagger"; -import type { ISwaggerInfo } from "./structures/ISwaggerInfo"; -import type { ISwaggerSecurityScheme } from "./structures/ISwaggerSecurityScheme"; +import { OpenApi } from "@samchon/openapi"; /** * Definition for the `nestia.config.ts` file. @@ -282,12 +279,12 @@ export namespace INestiaConfig { * * If omitted, `package.json` content would be used instead. */ - info?: Partial; + info?: Partial; /** * List of server addresses. */ - servers?: ISwagger.IServer[]; + servers?: OpenApi.IServer[]; /** * Security schemes. @@ -296,18 +293,38 @@ export namespace INestiaConfig { * theirs methods have a security key which is not enrolled in here property, * it would be an error. */ - security?: Record; + security?: Record; + + /** + * List of tag names with description. + * + * It is possible to omit this property or skip some tag name even if + * the tag name is used in the API routes. In that case, the tag name + * would be used without description. + * + * Of course, if you've written a comment like `@tag {name} {descrition}`, + * you can entirely replace this property specification. + */ + tags?: OpenApi.IDocument.ITag[]; /** * Decompose query DTO. * * If you configure this property to be `true`, the query DTO would be decomposed - * into individual query parameters per each property. + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. * * @default false */ decompose?: boolean; + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ operationId?(props: { class: string; function: string; diff --git a/website/pages/docs/sdk/sdk.mdx b/website/pages/docs/sdk/sdk.mdx index 1724052ca..b7ef7183c 100644 --- a/website/pages/docs/sdk/sdk.mdx +++ b/website/pages/docs/sdk/sdk.mdx @@ -150,10 +150,7 @@ export default NESTIA_CONFIG; ```typescript copy filename="INestiaConfig.ts" showLineNumbers {13-32} import type { INestApplication } from "@nestjs/common"; - -import type { ISwagger } from "./structures/ISwagger"; -import type { ISwaggerInfo } from "./structures/ISwaggerInfo"; -import type { ISwaggerSecurityScheme } from "./structures/ISwaggerSecurityScheme"; +import type { OpenApi } from "@samchon/openapi"; /** * Definition for the `nestia.config.ts` file. @@ -332,12 +329,12 @@ export namespace INestiaConfig { * * If omitted, `package.json` content would be used instead. */ - info?: Partial; + info?: Partial; /** * List of server addresses. */ - servers?: ISwagger.IServer[]; + servers?: OpenApi.IServer[]; /** * Security schemes. @@ -346,18 +343,38 @@ export namespace INestiaConfig { * theirs methods have a security key which is not enrolled in here property, * it would be an error. */ - security?: Record; + security?: Record; + + /** + * List of tag names with description. + * + * It is possible to omit this property or skip some tag name even if + * the tag name is used in the API routes. In that case, the tag name + * would be used without description. + * + * Of course, if you've written a comment like `@tag {name} {descrition}`, + * you can entirely replace this property specification. + */ + tags?: OpenApi.IDocument.ITag[]; /** * Decompose query DTO. * * If you configure this property to be `true`, the query DTO would be decomposed - * into individual query parameters per each property. + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. * * @default false */ decompose?: boolean; + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ operationId?(props: { class: string; function: string; diff --git a/website/pages/docs/sdk/simulator.mdx b/website/pages/docs/sdk/simulator.mdx index 2dfe3c5a5..e64280248 100644 --- a/website/pages/docs/sdk/simulator.mdx +++ b/website/pages/docs/sdk/simulator.mdx @@ -171,12 +171,9 @@ export default NESTIA_CONFIG; ``` -```typescript filename="INestiaConfig.ts" showLineNumbers {13-32, 55-68} +```typescript filename="INestiaConfig.ts" showLineNumbers {10-29, 52-65} import type { INestApplication } from "@nestjs/common"; - -import type { ISwagger } from "./structures/ISwagger"; -import type { ISwaggerInfo } from "./structures/ISwaggerInfo"; -import type { ISwaggerSecurityScheme } from "./structures/ISwaggerSecurityScheme"; +import type { OpenApi } from "@samchon/openapi"; /** * Definition for the `nestia.config.ts` file. @@ -355,12 +352,12 @@ export namespace INestiaConfig { * * If omitted, `package.json` content would be used instead. */ - info?: Partial; + info?: Partial; /** * List of server addresses. */ - servers?: ISwagger.IServer[]; + servers?: OpenApi.IServer[]; /** * Security schemes. @@ -369,18 +366,38 @@ export namespace INestiaConfig { * theirs methods have a security key which is not enrolled in here property, * it would be an error. */ - security?: Record; + security?: Record; + + /** + * List of tag names with description. + * + * It is possible to omit this property or skip some tag name even if + * the tag name is used in the API routes. In that case, the tag name + * would be used without description. + * + * Of course, if you've written a comment like `@tag {name} {descrition}`, + * you can entirely replace this property specification. + */ + tags?: OpenApi.IDocument.ITag[]; /** * Decompose query DTO. * * If you configure this property to be `true`, the query DTO would be decomposed - * into individual query parameters per each property. + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. * * @default false */ decompose?: boolean; + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ operationId?(props: { class: string; function: string; diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index 7d424bc40..1d8f0bc17 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -63,7 +63,7 @@ If you have a special configuration file that its file name is not `nestia.confi nestia.config.ts, INestiaConfig.ts, - ISwaggerSecurityScheme.ts, + OpenApi.ISecuritySchema, ]}> ```typescript copy filename="nestia.config.ts" showLineNumbers {18-34} @@ -106,13 +106,9 @@ export default NESTIA_CONFIG; ``` -```typescript filename="INestiaConfig.ts" showLineNumbers {14-19, 167-240} +```typescript filename="INestiaConfig.ts" showLineNumbers {11-16, 163-244} import type { INestApplication } from "@nestjs/common"; - -import type { ISwaggerInfo } from "./structures/ISwaggerInfo"; -import type { ISwaggerSecurityScheme } from "./structures/ISwaggerSecurityScheme"; -import type { ISwaggerServer } from "./structures/ISwaggerServer"; -import type { ISwaggerTag } from "./structures/ISwaggerTag"; +import type { OpenApi } from "@samchon/openapi"; /** * Definition for the `nestia.config.ts` file. @@ -302,12 +298,12 @@ export namespace INestiaConfig { * * If omitted, `package.json` content would be used instead. */ - info?: Partial; + info?: Partial; /** * List of server addresses. */ - servers?: ISwaggerServer[]; + servers?: OpenApi.IServer[]; /** * Security schemes. @@ -316,7 +312,7 @@ export namespace INestiaConfig { * theirs methods have a security key which is not enrolled in here property, * it would be an error. */ - security?: Record; + security?: Record; /** * List of tag names with description. @@ -328,7 +324,7 @@ export namespace INestiaConfig { * Of course, if you've written a comment like `@tag {name} {descrition}`, * you can entirely replace this property specification. */ - tags?: ISwaggerTag[]; + tags?: OpenApi.IDocument.ITag[]; /** * Decompose query DTO. @@ -359,24 +355,24 @@ export namespace INestiaConfig { ``` -```typescript filename="ISwaggerSecurityScheme.ts" showLineNumbers +```typescript filename="@samchon/openapi" showLineNumbers /** * Security scheme of Swagger Documents. * - * `ISwaggerSecurityScheme` is a data structure representing content of + * `ISecurityScheme` is a data structure representing content of * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security * schemes as an union type like below. * * @reference https://swagger.io/specification/#security-scheme-object * @author Jeongho Nam - https://github.com/samchon */ -export type ISwaggerSecurityScheme = - | ISwaggerSecurityScheme.IHttpBasic - | ISwaggerSecurityScheme.IHttpBearer - | ISwaggerSecurityScheme.IApiKey - | ISwaggerSecurityScheme.IOpenId - | ISwaggerSecurityScheme.IOAuth2; -export namespace ISwaggerSecurityScheme { +export type ISecurityScheme = + | ISecurityScheme.IHttpBasic + | ISecurityScheme.IHttpBearer + | ISecurityScheme.IApiKey + | ISecurityScheme.IOpenId + | ISecurityScheme.IOAuth2; +export namespace ISecurityScheme { export interface IHttpBasic { type: "http"; scheme: "basic"; @@ -388,15 +384,7 @@ export namespace ISwaggerSecurityScheme { } export interface IApiKey { type: "apiKey"; - - /** - * @default header - */ in?: "header" | "query" | "cookie"; - - /** - * @default Authorization - */ name?: string; } @@ -710,7 +698,7 @@ export namespace INestiaConfig { * `false`, the query DTO would be one object type which contains all of query * parameters. * - * @default true + * @default false */ decompose?: boolean; @@ -763,7 +751,7 @@ For reference, target security schemes must be configured in the `nestia.config. 'Controller', 'Swagger Documents', nestia.config.ts, - ISwaggerSecurityScheme, + OpenApi.ISecurityScheme, ]}> ```typescript filename="Controller" showLineNumbers {17-20, 35, 46-49, 66, 68} @@ -1183,24 +1171,24 @@ export default NESTIA_CONFIG; ``` -```typescript filename="ISwaggerSecurityScheme.ts" showLineNumbers +```typescript filename="@samchon/openapi" showLineNumbers /** * Security scheme of Swagger Documents. * - * `ISwaggerSecurityScheme` is a data structure representing content of + * `OpenApi.ISecurityScheme` is a data structure representing content of * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security * schemes as an union type like below. * * @reference https://swagger.io/specification/#security-scheme-object * @author Jeongho Nam - https://github.com/samchon */ -export type ISwaggerSecurityScheme = - | ISwaggerSecurityScheme.IHttpBasic - | ISwaggerSecurityScheme.IHttpBearer - | ISwaggerSecurityScheme.IApiKey - | ISwaggerSecurityScheme.IOpenId - | ISwaggerSecurityScheme.IOAuth2; -export namespace ISwaggerSecurityScheme { +export type ISecurityScheme = + | ISecurityScheme.IHttpBasic + | ISecurityScheme.IHttpBearer + | ISecurityScheme.IApiKey + | ISecurityScheme.IOpenId + | ISecurityScheme.IOAuth2; +export namespace ISecurityScheme { export interface IHttpBasic { type: "http"; scheme: "basic"; @@ -1212,15 +1200,7 @@ export namespace ISwaggerSecurityScheme { } export interface IApiKey { type: "apiKey"; - - /** - * @default header - */ in?: "header" | "query" | "cookie"; - - /** - * @default Authorization - */ name?: string; } @@ -1461,20 +1441,20 @@ export interface SpecialTag { /** * Security schema of Swagger Documents. * - * `ISwaggerSecurityScheme` is a data structure representing content of + * `ISecurityScheme` is a data structure representing content of * `securitySchemes` in `swagger.json` file. It is composed with 5 types of security * schemes as an union type like below. * * @reference https://swagger.io/specification/#security-scheme-object * @author Jeongho Nam - https://github.com/samchon */ -export type ISwaggerSecurityScheme = - | ISwaggerSecurityScheme.IHttpBasic - | ISwaggerSecurityScheme.IHttpBearer - | ISwaggerSecurityScheme.IApiKey - | ISwaggerSecurityScheme.IOpenId - | ISwaggerSecurityScheme.IOAuth2; -export namespace ISwaggerSecurityScheme { +export type ISecurityScheme = + | ISecurityScheme.IHttpBasic + | ISecurityScheme.IHttpBearer + | ISecurityScheme.IApiKey + | ISecurityScheme.IOpenId + | ISecurityScheme.IOAuth2; +export namespace ISecurityScheme { export interface IHttpBasic { type: "http"; scheme: "basic"; @@ -1619,19 +1599,19 @@ export function SwaggerCustomizer( ): MethodDecorator; export namespace SwaggerCustomizer { export interface IProps { - swagger: ISwagger; + swagger: OpenApi.IDocument; method: string; path: string; - route: ISwaggerRoute; + route: OpenApi.IOperation; at(func: Function): ISwaggerEndpoint | undefined; - get(accessor: IAccessor): ISwaggerRoute | undefined; + get(accessor: IAccessor): OpenApi.IOperation | undefined; } export interface IAccessor { path: string; method: string; } export interface ISwaggerEndpoint extends IAccessor { - route: ISwaggerRoute; + route: OpenApi.IOperation; } } ``` From e3f37a13f8655b250c81eb623907f7a1b7a4a2db Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 7 Jul 2024 18:14:15 +0900 Subject: [PATCH 011/204] Introduce `@nestjs/swagger` decorators supported in `@nestia/sdk` swagger generator. --- website/pages/docs/sdk/swagger.mdx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index 1d8f0bc17..256941e36 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -724,6 +724,15 @@ export namespace INestiaConfig { ## Special Tags +### `@nestjs/swagger` Decorators +Swagger generator fo `@nestia/sdk` supports some `@nestjs/swagger` decorators. Here is the list of them. + + - `@ApiBasicAuth()` + - `@ApiBearerAuth()` + - `@ApiOAuth2()` + - `@ApiSecurity()` + - `@ApiTags()` + ### Controller Methods Swagger generator `@nestia/sdk` supports three type of comment tags for controller methods: @@ -1513,7 +1522,7 @@ export namespace ISecurityScheme { ## Customization [Typia > JSON schema > Customization](https://typia.io/docs/json/schema/#customization) -If what you want is not just filling special properties of JSON schema spec, but to adding custom properties into the JSON schema definition, you can accomlish it with `typia` feature. Define a type based on `typia.tags.TagBase`, and specify the `schema` property type as you want. +If what you want is not just filling special properties of JSON schema spec, but to adding custom properties into the JSON schema definition, you can accomlish it with `typia` feature. Define a type based on `typia.tags.TagBase` or `typia.tags.JsonSchemaPlugin`, and specify the `schema` property type as you want. For reference, the custom property must be started with x- prefix. It's a rule of JSON schema. @@ -1531,13 +1540,8 @@ type Monetary = tags.TagBase<{ }; }>; -type Placeholder = tags.TagBase<{ - target: "boolean" | "number" | "string"; - kind: "placeholder"; - value: Value; - schema: { - "x-placeholder": Value; - }; +type Placeholder = tags.JsonSchemaPlugin<{ + "x-placeholder": Value; }>; interface IAccount { From 55e9e16a7941957766bc4d17515f99a8c968f08b Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 8 Jul 2024 01:50:46 +0900 Subject: [PATCH 012/204] Fix swagger.mdx line numbers --- website/pages/docs/sdk/swagger.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index 256941e36..f4fc1c685 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -1528,7 +1528,7 @@ For reference, the custom property must be started with x- prefix. It's a rule o -```typescript copy filename="examples/src/json-schema-custom.ts" copy showLineNumbers {7-9, 16-18, 22-23} +```typescript copy filename="examples/src/json-schema-custom.ts" copy showLineNumbers {7-9, 13, 17-18} import typia, { tags } from "typia"; type Monetary = tags.TagBase<{ @@ -1548,7 +1548,6 @@ interface IAccount { code: string & Placeholder<"Write you account code please">; balance: number & Monetary<"dollar">; }; - typia.json.application<[IAccount]>(); ``` From 0bbe8224a5e2910a9169f63419e2f854324f2c72 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 8 Jul 2024 12:49:03 +0900 Subject: [PATCH 013/204] Allow optional query parameter only when every properties are optional. --- benchmark/package.json | 2 +- package.json | 2 +- packages/core/package.json | 10 +- .../src/programmers/TypedQueryProgrammer.ts | 6 +- packages/e2e/package.json | 2 +- packages/fetcher/package.json | 2 +- packages/migrate/package.json | 2 +- packages/sdk/package.json | 14 +-- .../analyses/TypedHttpOperationAnalyzer.ts | 38 +++++-- .../internal/SdkHttpNamespaceProgrammer.ts | 21 +++- .../internal/SwaggerSchemaValidator.ts | 12 ++- .../packages/api/package.json | 2 +- .../packages/api/package.json | 2 +- .../distribute-json/packages/api/package.json | 2 +- .../distribute/packages/api/package.json | 2 +- test/features/query-decompose/swagger.json | 2 +- .../query-error-optional/nestia.config.ts | 15 +++ .../query-error-optional/src/Backend.ts | 28 ++++++ .../src/controllers/QueryController.ts | 22 +++++ .../query-error-optional/swagger.json | 1 + .../query-error-optional/tsconfig.json | 98 +++++++++++++++++++ .../query/src/api/functional/query/index.ts | 45 +++++++++ .../src/api/structures/IOptionalQuery.ts | 5 + .../query/src/controllers/QueryController.ts | 8 ++ .../features/api/test_api_query_optional.ts | 14 +++ test/features/query/swagger.json | 2 +- test/package.json | 10 +- website/package.json | 2 +- 28 files changed, 327 insertions(+), 44 deletions(-) create mode 100644 test/features/query-error-optional/nestia.config.ts create mode 100644 test/features/query-error-optional/src/Backend.ts create mode 100644 test/features/query-error-optional/src/controllers/QueryController.ts create mode 100644 test/features/query-error-optional/swagger.json create mode 100644 test/features/query-error-optional/tsconfig.json create mode 100644 test/features/query/src/api/structures/IOptionalQuery.ts create mode 100644 test/features/query/src/test/features/api/test_api_query_optional.ts diff --git a/benchmark/package.json b/benchmark/package.json index 129b387bf..c90705146 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -41,7 +41,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.4.0" + "typia": "^6.4.2" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/package.json b/package.json index 4d947897c..99bf3c7b1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.4.3", + "version": "3.5.0-dev.20240707", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index ae9da0d22..c61812198 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.4.3", + "version": "3.5.0-dev.20240707", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.3", + "@nestia/fetcher": "^3.5.0-dev.20240707", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.0", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.4.0", + "typia": "^6.4.2", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.3", + "@nestia/fetcher": ">=3.5.0-dev.20240707", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.4.0 <7.0.0" + "typia": ">=6.4.2 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/core/src/programmers/TypedQueryProgrammer.ts b/packages/core/src/programmers/TypedQueryProgrammer.ts index f274c8a5f..76f0f8f4a 100644 --- a/packages/core/src/programmers/TypedQueryProgrammer.ts +++ b/packages/core/src/programmers/TypedQueryProgrammer.ts @@ -20,6 +20,7 @@ export namespace TypedQueryProgrammer { project: IProject, ) => ( modulo: ts.LeftHandSideExpression, + allowOptiona: boolean, ) => (type: ts.Type) => ts.ArrowFunction, ) => ts.factory.createObjectLiteralExpression([ @@ -36,7 +37,10 @@ export namespace TypedQueryProgrammer { finite: false, functional: false, }, - })(modulo)(type), + })( + modulo, + true, + )(type), ), ]); diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 35e6c3c1e..eba040c35 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -38,7 +38,7 @@ "ts-node": "^10.9.1", "ts-patch": "^3.2.1", "typescript": "^5.5.2", - "typia": "^6.4.0" + "typia": "^6.4.2" }, "dependencies": { "@nestia/fetcher": "^3.2.2", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 3e839b0e0..f91aacb0d 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.4.3", + "version": "3.5.0-dev.20240707", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 535c6dc0a..97052eb0d 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -69,7 +69,7 @@ "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.4.0" + "typia": "^6.4.2" }, "files": [ "lib", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index e1a3784db..d7ccc8fd4 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.4.3", + "version": "3.5.0-dev.20240707", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.4.3", - "@nestia/core": "^3.4.3", + "@nestia/fetcher": "^3.5.0-dev.20240707", + "@nestia/core": "^3.5.0-dev.20240707", "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -44,16 +44,16 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.4.0" + "typia": "^6.4.2" }, "peerDependencies": { - "@nestia/fetcher": ">=3.4.3", - "@nestia/core": ">=3.4.3", + "@nestia/fetcher": ">=3.5.0-dev.20240707", + "@nestia/core": ">=3.5.0-dev.20240707", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.4.0 <7.0.0" + "typia": ">=6.4.2 <7.0.0" }, "devDependencies": { "@nestia/e2e": "^0.4.3", diff --git a/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts b/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts index 9f4aebe6b..03bd7c854 100644 --- a/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts +++ b/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts @@ -3,6 +3,8 @@ import path from "path"; import { HashMap } from "tstl"; import ts from "typescript"; import { CommentFactory } from "typia/lib/factories/CommentFactory"; +import { MetadataCollection } from "typia/lib/factories/MetadataCollection"; +import { MetadataFactory } from "typia/lib/factories/MetadataFactory"; import { IErrorReport } from "../structures/IErrorReport"; import { INestiaProject } from "../structures/INestiaProject"; @@ -287,16 +289,32 @@ export namespace TypedHttpOperationAnalyzer { optional === true && props.parameter.category === "query" && props.parameter.field === undefined - ) - errors.push({ - file: props.controller.file, - controller: props.controller.name, - function: props.function, - message: - `nestia does not support optional query parameter without field specification. ` + - `Therefore, erase question mark on the "${name}" parameter, ` + - `or re-define re-define parameters for each query parameters.`, - }); + ) { + const everyPropertiesAreOptional: boolean = (() => { + const res = MetadataFactory.analyze(project.checker)({ + escape: false, + constant: true, + absorb: true, + })(new MetadataCollection())(type); + if (res.success === false) return false; + const m = res.data; + return ( + m.size() === 1 && + m.objects.length === 1 && + m.objects[0]!.properties.every((p) => p.value.optional === true) + ); + })(); + if (everyPropertiesAreOptional === false) + errors.push({ + file: props.controller.file, + controller: props.controller.name, + function: props.function, + message: + `nestia does not support optional query parameter exception field specification or every properties are optional case. ` + + `Therefore, erase question mark on the "${name}" parameter, ` + + `or re-define re-define parameters for each query parameters.`, + }); + } // GET TYPE NAME const tuple: ITypeTuple | null = ImportAnalyzer.analyze(project.checker)({ diff --git a/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts b/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts index abc249ac6..b5b371023 100644 --- a/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts +++ b/packages/sdk/src/generates/internal/SdkHttpNamespaceProgrammer.ts @@ -211,7 +211,14 @@ export namespace SdkHttpNamespaceProgrammer { IdentifierFactory.parameter( p.name, p === props.query - ? ts.factory.createTypeReferenceNode(`${route.name}.Query`) + ? p.optional + ? ts.factory.createUnionTypeNode([ + ts.factory.createTypeReferenceNode( + `${route.name}.Query`, + ), + ts.factory.createTypeReferenceNode("undefined"), + ]) + : ts.factory.createTypeReferenceNode(`${route.name}.Query`) : getType(project)(importer)(p), ), ), @@ -409,7 +416,17 @@ export namespace SdkHttpNamespaceProgrammer { ); }; if (props.query !== undefined && g.query.length === 0) - return out(block(ts.factory.createIdentifier(props.query.name))); + return out( + block( + props.query.optional + ? ts.factory.createBinaryExpression( + ts.factory.createIdentifier(props.query.name), + ts.factory.createToken(ts.SyntaxKind.QuestionQuestionToken), + ts.factory.createObjectLiteralExpression([], false), + ) + : ts.factory.createIdentifier(props.query.name), + ), + ); return out( block( ts.factory.createObjectLiteralExpression( diff --git a/packages/sdk/src/generates/internal/SwaggerSchemaValidator.ts b/packages/sdk/src/generates/internal/SwaggerSchemaValidator.ts index 1d09b8172..42348fc43 100644 --- a/packages/sdk/src/generates/internal/SwaggerSchemaValidator.ts +++ b/packages/sdk/src/generates/internal/SwaggerSchemaValidator.ts @@ -34,8 +34,16 @@ export namespace SwaggerSchemaValidator { if (meta.objects.length !== 1 || meta.bucket() !== 1) insert("only one object type is allowed."); if (meta.nullable === true) insert("query parameters cannot be null."); - if (meta.isRequired() === false) - insert("query parameters cannot be undefined."); + if (meta.isRequired() === false) { + const everyPropertiesAreOptional: boolean = + meta.size() === 1 && + meta.objects.length === 1 && + meta.objects[0].properties.every((p) => p.value.optional); + if (everyPropertiesAreOptional === false) + insert( + "query parameters can be optional only when every properties are optional.", + ); + } } else if ( explore.nested !== null && explore.nested instanceof MetadataArray diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 736bfe982..091968344 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.4.2-dev.20240705", - "typia": "^6.4.0" + "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 736bfe982..091968344 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.4.2-dev.20240705", - "typia": "^6.4.0" + "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 736bfe982..091968344 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.4.2-dev.20240705", - "typia": "^6.4.0" + "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 736bfe982..091968344 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.4.2-dev.20240705", - "typia": "^6.4.0" + "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/query-decompose/swagger.json b/test/features/query-decompose/swagger.json index 7cf735f6a..6f7d2ad78 100644 --- a/test/features/query-decompose/swagger.json +++ b/test/features/query-decompose/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240707","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-error-optional/nestia.config.ts b/test/features/query-error-optional/nestia.config.ts new file mode 100644 index 000000000..ca670ea91 --- /dev/null +++ b/test/features/query-error-optional/nestia.config.ts @@ -0,0 +1,15 @@ +import { INestiaConfig } from "@nestia/sdk"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + output: "src/api", + swagger: { + output: "swagger.json", + security: { + bearer: { + type: "apiKey", + }, + }, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/query-error-optional/src/Backend.ts b/test/features/query-error-optional/src/Backend.ts new file mode 100644 index 000000000..7e69bc6bd --- /dev/null +++ b/test/features/query-error-optional/src/Backend.ts @@ -0,0 +1,28 @@ +import core from "@nestia/core"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +export class Backend { + private application_?: INestApplication; + + public async open(): Promise { + this.application_ = await NestFactory.create( + await core.EncryptedModule.dynamic(__dirname + "/controllers", { + key: "A".repeat(32), + iv: "B".repeat(16), + }), + { logger: false }, + ); + await core.WebSocketAdaptor.upgrade(this.application_); + await this.application_.listen(37_000); + } + + public async close(): Promise { + if (this.application_ === undefined) return; + + const app = this.application_; + await app.close(); + + delete this.application_; + } +} diff --git a/test/features/query-error-optional/src/controllers/QueryController.ts b/test/features/query-error-optional/src/controllers/QueryController.ts new file mode 100644 index 000000000..a626a623f --- /dev/null +++ b/test/features/query-error-optional/src/controllers/QueryController.ts @@ -0,0 +1,22 @@ +import { TypedQuery, TypedRoute } from "@nestia/core"; +import { Controller } from "@nestjs/common"; + +@Controller("query") +export class QueryController { + @TypedRoute.Get("optional") + public async optional( + @TypedQuery() query?: IOptionalQuery, + ): Promise { + return ( + query ?? { + b: 1, + c: false, + } + ); + } +} +export interface IOptionalQuery { + a?: string; + b: number; + c: boolean; +} diff --git a/test/features/query-error-optional/swagger.json b/test/features/query-error-optional/swagger.json new file mode 100644 index 000000000..9728399f0 --- /dev/null +++ b/test/features/query-error-optional/swagger.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240707","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IOptionalQuery"},"description":"","required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-error-optional/tsconfig.json b/test/features/query-error-optional/tsconfig.json new file mode 100644 index 000000000..fbaf6ada7 --- /dev/null +++ b/test/features/query-error-optional/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./bin", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + } + } \ No newline at end of file diff --git a/test/features/query/src/api/functional/query/index.ts b/test/features/query/src/api/functional/query/index.ts index 87b1c8242..6df718a6d 100644 --- a/test/features/query/src/api/functional/query/index.ts +++ b/test/features/query/src/api/functional/query/index.ts @@ -9,6 +9,7 @@ import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; import typia from "typia"; import type { INestQuery } from "../../structures/INestQuery"; +import type { IOptionalQuery } from "../../structures/IOptionalQuery"; import type { IQuery } from "../../structures/IQuery"; /** @@ -55,6 +56,50 @@ export namespace typed { }; } +/** + * @controller QueryController.optional + * @path GET /query/optional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function optional( + connection: IConnection, + query?: optional.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...optional.METADATA, + template: optional.METADATA.path, + path: optional.path(query), + }); +} +export namespace optional { + export type Query = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/query/optional", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (query: optional.Query | undefined) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query ?? ({} as any))) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = "/query/optional"; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + /** * @controller QueryController.nest * @path GET /query/nest diff --git a/test/features/query/src/api/structures/IOptionalQuery.ts b/test/features/query/src/api/structures/IOptionalQuery.ts new file mode 100644 index 000000000..2c2009d3f --- /dev/null +++ b/test/features/query/src/api/structures/IOptionalQuery.ts @@ -0,0 +1,5 @@ +export interface IOptionalQuery { + a?: string; + b?: number; + c?: boolean; +} diff --git a/test/features/query/src/controllers/QueryController.ts b/test/features/query/src/controllers/QueryController.ts index 81f688819..a0e8d5427 100644 --- a/test/features/query/src/controllers/QueryController.ts +++ b/test/features/query/src/controllers/QueryController.ts @@ -2,6 +2,7 @@ import { TypedQuery, TypedRoute } from "@nestia/core"; import { Controller, Query } from "@nestjs/common"; import { INestQuery } from "@api/lib/structures/INestQuery"; +import { IOptionalQuery } from "@api/lib/structures/IOptionalQuery"; import { IQuery } from "@api/lib/structures/IQuery"; @Controller("query") @@ -11,6 +12,13 @@ export class QueryController { return query; } + @TypedRoute.Get("optional") + public async optional( + @TypedQuery() query?: IOptionalQuery, + ): Promise { + return query ?? {}; + } + @TypedRoute.Get("nest") public async nest(@Query() query: INestQuery): Promise { return { diff --git a/test/features/query/src/test/features/api/test_api_query_optional.ts b/test/features/query/src/test/features/api/test_api_query_optional.ts new file mode 100644 index 000000000..18aab115d --- /dev/null +++ b/test/features/query/src/test/features/api/test_api_query_optional.ts @@ -0,0 +1,14 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IOptionalQuery } from "@api/lib/structures/IOptionalQuery"; + +export const test_api_query_body = async ( + connection: api.IConnection, +): Promise => { + const result: IOptionalQuery = + await api.functional.query.optional(connection); + typia.assertEquals(result); + TestValidator.equals("body")(result)({}); +}; diff --git a/test/features/query/swagger.json b/test/features/query/swagger.json index d318f96bd..9728399f0 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240707","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IOptionalQuery"},"description":"","required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/package.json b/test/package.json index 9c352418c..e58b0e9bb 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/test", - "version": "3.4.3", + "version": "3.5.0-dev.20240707", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.4.3", + "@nestia/sdk": "^3.5.0-dev.20240707", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.4.3", + "@nestia/core": "^3.5.0-dev.20240707", "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.4.3", + "@nestia/fetcher": "^3.5.0-dev.20240707", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.4.0", + "typia": "^6.4.2", "uuid": "^9.0.1" } } \ No newline at end of file diff --git a/website/package.json b/website/package.json index 0ff6eb3f4..0f45708b3 100644 --- a/website/package.json +++ b/website/package.json @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.4.0" + "typia": "^6.4.2" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", From 5a0deb5ba6627da11a73a13a922412115bd7d3c6 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 8 Jul 2024 13:02:35 +0900 Subject: [PATCH 014/204] Publish v3.5 update --- package.json | 2 +- packages/core/package.json | 6 +++--- packages/fetcher/package.json | 2 +- packages/migrate/package.json | 8 ++++---- packages/sdk/package.json | 24 +++++------------------- test/package.json | 8 ++++---- 6 files changed, 18 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 99bf3c7b1..0c0676dc6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.5.0-dev.20240707", + "version": "3.5.0", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index c61812198..b0b116352 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.5.0-dev.20240707", + "version": "3.5.0", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.5.0-dev.20240707", + "@nestia/fetcher": "^3.5.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.0", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.5.0-dev.20240707", + "@nestia/fetcher": ">=3.5.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index f91aacb0d..16dc1135a 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.5.0-dev.20240707", + "version": "3.5.0", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 97052eb0d..5ead6f22b 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/migrate", - "version": "0.14.1", + "version": "0.14.2", "description": "Migration program from swagger to NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,9 +36,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/core": "^3.4.1", + "@nestia/core": "^3.5.0", "@nestia/e2e": "^0.6.0", - "@nestia/fetcher": "^3.4.1", + "@nestia/fetcher": "^3.5.0", "@nestjs/common": "^10.3.8", "@nestjs/core": "^10.3.8", "@nestjs/platform-express": "^10.3.8", @@ -63,7 +63,7 @@ "typescript-transform-paths": "^3.4.6" }, "dependencies": { - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.3.1", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 5ac67556a..b732bb92d 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,10 +1,6 @@ { "name": "@nestia/sdk", -<<<<<<< HEAD - "version": "3.5.0-dev.20240707", -======= - "version": "3.5.0-dev.20240706", ->>>>>>> 961de1f1aeae07cc59cf24e43774df2bc53db2bc + "version": "3.5.0", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,13 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { -<<<<<<< HEAD - "@nestia/fetcher": "^3.5.0-dev.20240707", - "@nestia/core": "^3.5.0-dev.20240707", -======= - "@nestia/fetcher": "^3.5.0-dev.20240706", - "@nestia/core": "^3.5.0-dev.20240706", ->>>>>>> 961de1f1aeae07cc59cf24e43774df2bc53db2bc + "@nestia/fetcher": "^3.5.0", + "@nestia/core": "^3.5.0", "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -56,13 +47,8 @@ "typia": "^6.4.2" }, "peerDependencies": { -<<<<<<< HEAD - "@nestia/fetcher": ">=3.5.0-dev.20240707", - "@nestia/core": ">=3.5.0-dev.20240707", -======= - "@nestia/fetcher": ">=3.5.0-dev.20240706", - "@nestia/core": ">=3.5.0-dev.20240706", ->>>>>>> 961de1f1aeae07cc59cf24e43774df2bc53db2bc + "@nestia/fetcher": ">=3.5.0", + "@nestia/core": ">=3.5.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/test/package.json b/test/package.json index e58b0e9bb..2083c4c7b 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/test", - "version": "3.5.0-dev.20240707", + "version": "3.5.0", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.5.0-dev.20240707", + "@nestia/sdk": "^3.5.0", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.5.0-dev.20240707", + "@nestia/core": "^3.5.0", "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.5.0-dev.20240707", + "@nestia/fetcher": "^3.5.0", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From 9f66379b51f9f96bcb548f05b959e34c619ad4cc Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 8 Jul 2024 16:24:04 +0900 Subject: [PATCH 015/204] Update `swagger.mdx`: supported NestJS decorators --- website/pages/docs/sdk/swagger.mdx | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index f4fc1c685..fe2191c4d 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -724,14 +724,23 @@ export namespace INestiaConfig { ## Special Tags -### `@nestjs/swagger` Decorators -Swagger generator fo `@nestia/sdk` supports some `@nestjs/swagger` decorators. Here is the list of them. - - - `@ApiBasicAuth()` - - `@ApiBearerAuth()` - - `@ApiOAuth2()` - - `@ApiSecurity()` - - `@ApiTags()` +### NestJS Decorators +Swagger generator fo `@nestia/sdk` supports some NestJS decorators. Here is the list of them. + + - `@nestjs/common` + - `@Get()`, `@Post()`, `@Put()`, `@Patch()`, `@Delete()`, ... + - `@Header()`, `@Headers()` + - `@Body()` + - `@HttpCode()` + - `@Param()` + - `@Query()` + - `@Version()` + - `@nestjs/swagger` + - `@ApiBasicAuth()` + - `@ApiBearerAuth()` + - `@ApiOAuth2()` + - `@ApiSecurity()` + - `@ApiTags()` ### Controller Methods Swagger generator `@nestia/sdk` supports three type of comment tags for controller methods: From bfc67ab18dc6c2fe3d53800d6619719842c46b0f Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 10 Jul 2024 01:59:45 +0900 Subject: [PATCH 016/204] Close #938: separate `@nestia/benchmark` from `@nestia/e2e`. --- benchmark/package.json | 5 +- packages/benchmark/.gitignore | 1 + packages/benchmark/LICENSE | 21 ++ packages/benchmark/package.json | 52 +++ .../src/DynamicBenchmarker.ts | 6 +- .../src}/IBenchmarkEvent.ts | 0 packages/benchmark/src/index.ts | 2 + .../src/internal}/IBenchmarkMaster.ts | 1 - .../src/internal}/IBenchmarkServant.ts | 2 +- packages/benchmark/test/api/HttpError.ts | 1 + packages/benchmark/test/api/IConnection.ts | 1 + packages/benchmark/test/api/Primitive.ts | 1 + .../test/api/functional/bbs/articles/index.ts | 327 ++++++++++++++++++ .../test/api/functional/bbs/index.ts | 7 + .../benchmark/test/api/functional/index.ts | 7 + packages/benchmark/test/api/index.ts | 4 + packages/benchmark/test/api/module.ts | 4 + .../test/api/structures/bbs/IBbsArticle.ts | 140 ++++++++ .../api/structures/common/IAttachmentFile.ts | 7 + .../test/api/structures/common/IPage.ts | 74 ++++ .../test/controllers/bbs/BbsArticleModule.ts | 8 + .../controllers/bbs/BbsArticlesController.ts | 97 ++++++ .../test/features/test_api_bbs_article_at.ts | 47 +++ .../features/test_api_bbs_article_create.ts | 37 ++ .../test_api_bbs_article_index_search.ts | 67 ++++ .../test_api_bbs_article_index_sort.ts | 55 +++ .../features/test_api_bbs_article_update.ts | 62 ++++ packages/benchmark/test/index.ts | 26 ++ packages/benchmark/test/nestia.config.ts | 12 + packages/benchmark/test/servant.ts | 13 + packages/benchmark/test/tsconfig.json | 17 + packages/benchmark/tsconfig.json | 86 +++++ packages/core/package.json | 2 +- packages/e2e/package.json | 28 +- packages/e2e/src/DynamicExecutor.ts | 158 ++++----- packages/e2e/src/GaffComparator.ts | 15 +- packages/e2e/src/RandomGenerator.ts | 13 +- packages/e2e/src/StopWatch.ts | 38 -- packages/e2e/src/TestValidator.ts | 10 +- packages/e2e/src/module.ts | 2 - packages/e2e/src/test/index.ts | 13 - .../internal/generate_random_articles.ts | 3 +- .../test/features/structures/IBbsArticle.ts | 0 .../test/features/structures/IPage.ts | 0 .../test/features/test_array_subsets.ts | 2 +- .../test/features/test_validate_equals.ts | 2 +- .../test/features/test_validate_error.ts | 2 +- .../test/features/test_validate_http_error.ts | 2 +- .../test/features/test_validate_index.ts | 3 +- .../test/features/test_validate_predicate.ts | 2 +- .../test/features/test_validate_search.ts | 3 +- .../test/features/test_validate_sort.ts | 4 +- packages/e2e/test/index.ts | 20 ++ packages/e2e/test/tsconfig.json | 14 + packages/e2e/tsconfig.json | 8 +- packages/migrate/package.json | 10 +- packages/sdk/package.json | 5 +- test/features/all/src/test/index.ts | 9 +- test/features/all/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../swagger.json | 2 +- .../src/test/index.ts | 9 +- .../app-globalPrefix-versionUri/swagger.json | 2 +- .../app-globalPrefix/src/test/index.ts | 9 +- test/features/app-globalPrefix/swagger.json | 2 +- .../app-routerModule/src/test/index.ts | 9 +- test/features/app-routerModule/swagger.json | 2 +- .../app-versionHeader/src/test/index.ts | 9 +- test/features/app-versionHeader/swagger.json | 2 +- .../features/app-versionUri/src/test/index.ts | 9 +- test/features/app-versionUri/swagger.json | 2 +- test/features/app/src/test/index.ts | 9 +- test/features/app/swagger.json | 2 +- test/features/beautify-4/src/test/index.ts | 9 +- test/features/beautify-4/swagger.json | 2 +- .../features/beautify-false/src/test/index.ts | 9 +- test/features/beautify-false/swagger.json | 2 +- test/features/beautify/src/test/index.ts | 9 +- test/features/beautify/swagger.json | 2 +- .../body-config-assert/src/test/index.ts | 9 +- test/features/body-config-assert/swagger.json | 2 +- .../body-config-assertClone/src/test/index.ts | 9 +- .../body-config-assertClone/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../body-config-assertEquals/swagger.json | 2 +- .../body-config-assertPrune/src/test/index.ts | 9 +- .../body-config-assertPrune/swagger.json | 2 +- .../body-config-equals/src/test/index.ts | 9 +- test/features/body-config-equals/swagger.json | 2 +- .../features/body-config-is/src/test/index.ts | 9 +- test/features/body-config-is/swagger.json | 2 +- .../body-config-validate/src/test/index.ts | 9 +- .../body-config-validate/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../body-config-validateClone/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../body-config-validateEquals/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../body-config-validatePrune/swagger.json | 2 +- .../body-generic-default/src/test/index.ts | 9 +- .../body-generic-default/swagger.json | 2 +- .../body-manual-assert/src/test/index.ts | 9 +- test/features/body-manual-assert/swagger.json | 2 +- .../features/body-manual-is/src/test/index.ts | 9 +- test/features/body-manual-is/swagger.json | 2 +- .../body-manual-validate/src/test/index.ts | 9 +- .../body-manual-validate/swagger.json | 2 +- test/features/body/src/test/index.ts | 9 +- test/features/body/swagger.json | 2 +- .../cli-config-project/src/test/index.ts | 9 +- test/features/cli-config-project/swagger.json | 2 +- test/features/cli-config/src/test/index.ts | 9 +- test/features/cli-config/swagger.json | 2 +- test/features/cli-project/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../swagger.json | 2 +- .../clone-and-propagate/src/test/index.ts | 9 +- .../features/clone-and-propagate/swagger.json | 71 +++- .../features/clone-implicit/src/test/index.ts | 9 +- test/features/clone-implicit/swagger.json | 2 +- test/features/clone-native/src/test/index.ts | 9 +- test/features/clone-native/swagger.json | 2 +- .../features/config-pattern/src/test/index.ts | 9 +- test/features/config-pattern/swagger.json | 2 +- test/features/date/src/test/index.ts | 9 +- test/features/date/swagger.json | 2 +- .../packages/api/package.json | 4 +- .../distribute-assert-json/swagger.json | 2 +- .../packages/api/package.json | 4 +- test/features/distribute-assert/swagger.json | 2 +- .../distribute-json/packages/api/package.json | 4 +- test/features/distribute-json/swagger.json | 2 +- .../distribute/packages/api/package.json | 4 +- test/features/distribute/swagger.json | 2 +- test/features/duplicated/src/test/index.ts | 9 +- test/features/duplicated/swagger.json | 2 +- test/features/e2e/src/test/index.ts | 9 +- test/features/e2e/swagger.json | 2 +- test/features/encrypted/src/test/index.ts | 9 +- test/features/encrypted/swagger.json | 2 +- .../exception-filter/src/test/index.ts | 9 +- test/features/exception-filter/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../exception-with-propagate/swagger.json | 2 +- test/features/exception/src/test/index.ts | 9 +- test/features/exception/swagger.json | 2 +- test/features/fastify/src/test/index.ts | 9 +- test/features/fastify/swagger.json | 2 +- .../headers-decompose/src/test/index.ts | 9 +- test/features/headers-decompose/swagger.json | 2 +- test/features/headers/src/test/index.ts | 9 +- test/features/headers/swagger.json | 2 +- test/features/ignore/src/test/index.ts | 9 +- test/features/ignore/swagger.json | 2 +- .../features/implicit-error/src/test/index.ts | 9 +- test/features/kebab/src/test/index.ts | 9 +- test/features/kebab/swagger.json | 2 +- test/features/method/src/test/index.ts | 9 +- test/features/method/swagger.json | 2 +- test/features/migrate/migrate.json | 6 +- test/features/migrate/src/test/index.ts | 9 +- test/features/migrate/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../multipart-form-data-fastify/swagger.json | 4 +- .../multipart-form-data/src/test/index.ts | 9 +- .../features/multipart-form-data/swagger.json | 4 +- test/features/non-equals/src/test/index.ts | 9 +- test/features/non-equals/swagger.json | 2 +- test/features/operationId/src/test/index.ts | 9 +- test/features/operationId/swagger.json | 2 +- test/features/param/src/test/index.ts | 9 +- test/features/param/swagger.json | 2 +- test/features/plain/src/test/index.ts | 9 +- test/features/plain/swagger.json | 2 +- test/features/propagate/src/test/index.ts | 9 +- test/features/propagate/swagger.json | 2 +- .../query-decompose-false/src/test/index.ts | 9 +- .../query-decompose-false/swagger.json | 2 +- .../query-decompose-true/src/test/index.ts | 9 +- .../query-decompose-true/swagger.json | 2 +- test/features/query-decompose/swagger.json | 1 - test/features/query/src/test/index.ts | 9 +- test/features/query/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../route-manual-assert/src/test/index.ts | 9 +- .../features/route-manual-assert/swagger.json | 2 +- .../route-manual-is/src/test/index.ts | 9 +- test/features/route-manual-is/swagger.json | 2 +- .../route-manual-stringify/src/test/index.ts | 9 +- .../route-manual-stringify/swagger.json | 2 +- .../route-manual-validate/src/test/index.ts | 9 +- .../route-manual-validate/swagger.json | 2 +- test/features/route/src/test/index.ts | 9 +- test/features/route/swagger.json | 2 +- .../src/test/index.ts | 9 +- .../src/test/index.ts | 9 +- .../src/test/index.ts | 9 +- test/features/security/src/test/index.ts | 9 +- test/features/security/swagger.json | 2 +- test/features/simulate/src/test/index.ts | 9 +- test/features/simulate/swagger.json | 2 +- test/features/status/src/test/index.ts | 9 +- test/features/status/swagger.json | 2 +- .../swagger-customizer/src/test/index.ts | 9 +- test/features/swagger-customizer/swagger.json | 4 +- .../src/test/index.ts" | 9 +- test/features/swagger/src/test/index.ts | 9 +- test/features/tags/src/test/index.ts | 9 +- test/features/tags/swagger.json | 4 +- test/features/variable/src/test/index.ts | 9 +- test/features/variable/swagger.json | 2 +- .../websocket-clone/src/test/index.ts | 9 +- test/features/websocket-clone/swagger.json | 2 +- test/features/websocket/src/test/index.ts | 9 +- test/features/websocket/swagger.json | 2 +- test/package.json | 10 +- 216 files changed, 2111 insertions(+), 391 deletions(-) create mode 100644 packages/benchmark/.gitignore create mode 100644 packages/benchmark/LICENSE create mode 100644 packages/benchmark/package.json rename packages/{e2e => benchmark}/src/DynamicBenchmarker.ts (98%) rename packages/{e2e/src/structures => benchmark/src}/IBenchmarkEvent.ts (100%) create mode 100644 packages/benchmark/src/index.ts rename packages/{e2e/src/structures => benchmark/src/internal}/IBenchmarkMaster.ts (75%) rename packages/{e2e/src/structures => benchmark/src/internal}/IBenchmarkServant.ts (71%) create mode 100644 packages/benchmark/test/api/HttpError.ts create mode 100644 packages/benchmark/test/api/IConnection.ts create mode 100644 packages/benchmark/test/api/Primitive.ts create mode 100644 packages/benchmark/test/api/functional/bbs/articles/index.ts create mode 100644 packages/benchmark/test/api/functional/bbs/index.ts create mode 100644 packages/benchmark/test/api/functional/index.ts create mode 100644 packages/benchmark/test/api/index.ts create mode 100644 packages/benchmark/test/api/module.ts create mode 100644 packages/benchmark/test/api/structures/bbs/IBbsArticle.ts create mode 100644 packages/benchmark/test/api/structures/common/IAttachmentFile.ts create mode 100644 packages/benchmark/test/api/structures/common/IPage.ts create mode 100644 packages/benchmark/test/controllers/bbs/BbsArticleModule.ts create mode 100644 packages/benchmark/test/controllers/bbs/BbsArticlesController.ts create mode 100644 packages/benchmark/test/features/test_api_bbs_article_at.ts create mode 100644 packages/benchmark/test/features/test_api_bbs_article_create.ts create mode 100644 packages/benchmark/test/features/test_api_bbs_article_index_search.ts create mode 100644 packages/benchmark/test/features/test_api_bbs_article_index_sort.ts create mode 100644 packages/benchmark/test/features/test_api_bbs_article_update.ts create mode 100644 packages/benchmark/test/index.ts create mode 100644 packages/benchmark/test/nestia.config.ts create mode 100644 packages/benchmark/test/servant.ts create mode 100644 packages/benchmark/test/tsconfig.json create mode 100644 packages/benchmark/tsconfig.json delete mode 100644 packages/e2e/src/StopWatch.ts delete mode 100644 packages/e2e/src/test/index.ts rename packages/e2e/{src => }/test/features/internal/generate_random_articles.ts (91%) rename packages/e2e/{src => }/test/features/structures/IBbsArticle.ts (100%) rename packages/e2e/{src => }/test/features/structures/IPage.ts (100%) rename packages/e2e/{src => }/test/features/test_array_subsets.ts (91%) rename packages/e2e/{src => }/test/features/test_validate_equals.ts (92%) rename packages/e2e/{src => }/test/features/test_validate_error.ts (91%) rename packages/e2e/{src => }/test/features/test_validate_http_error.ts (97%) rename packages/e2e/{src => }/test/features/test_validate_index.ts (89%) rename packages/e2e/{src => }/test/features/test_validate_predicate.ts (90%) rename packages/e2e/{src => }/test/features/test_validate_search.ts (96%) rename packages/e2e/{src => }/test/features/test_validate_sort.ts (95%) create mode 100644 packages/e2e/test/index.ts create mode 100644 packages/e2e/test/tsconfig.json delete mode 100644 test/features/query-decompose/swagger.json diff --git a/benchmark/package.json b/benchmark/package.json index c90705146..db6f3a5df 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -1,8 +1,9 @@ { - "name": "@nestia/benchmark", + "private": true, + "name": "@samchon/nestia-benchmark", "version": "0.1.0", "description": "Benchmark Nestia", - "main": "bin/index.js", + "main": "lib/index.js", "scripts": { "build": "rimraf bin && tsc", "generate": "ts-node src/generate && npm run prettier && npm run build", diff --git a/packages/benchmark/.gitignore b/packages/benchmark/.gitignore new file mode 100644 index 000000000..ff8e543a5 --- /dev/null +++ b/packages/benchmark/.gitignore @@ -0,0 +1 @@ +BENCHMARK.md \ No newline at end of file diff --git a/packages/benchmark/LICENSE b/packages/benchmark/LICENSE new file mode 100644 index 000000000..078d83d13 --- /dev/null +++ b/packages/benchmark/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jeongho Nam + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json new file mode 100644 index 000000000..4fde820c3 --- /dev/null +++ b/packages/benchmark/package.json @@ -0,0 +1,52 @@ +{ + "name": "@nestia/benchmark", + "version": "0.1.0", + "description": "NestJS Performance Benchmark Program", + "main": "lib/index.js", + "typings": "lib/index.d.ts", + "scripts": { + "build": "npm run build:main && npm run build:test", + "build:main": "rimraf lib && tsc", + "build:test": "rimraf bin && tsc -p test/tsconfig.json", + "dev": "npm run build:test -- --watch", + "prepare": "ts-patch install && typia patch", + "test": "node bin/test" + }, + "keywords": [ + "e2e", + "nestia", + "nestjs", + "Performance", + "benchmark" + ], + "author": "Jeongho Nam", + "license": "MIT", + "devDependencies": { + "@nestia/core": "^3.5.0", + "@nestia/e2e": "^0.7.0", + "@nestia/sdk": "^3.5.0", + "@nestjs/common": "^10.3.10", + "@nestjs/core": "^10.3.10", + "@nestjs/platform-express": "^10.3.10", + "@types/uuid": "^10.0.0", + "nestia": "^5.3.1", + "ts-node": "^10.9.2", + "ts-patch": "^3.2.1", + "typescript": "^5.5.3", + "typescript-transform-paths": "^3.4.7", + "typia": "^6.4.3", + "uuid": "^10.0.0" + }, + "dependencies": { + "@nestia/fetcher": "^3.5.0", + "tgrid": "^1.0.2", + "tstl": "^3.0.0" + }, + "files": [ + "lib", + "src", + "README.md", + "LICENSE", + "package.json" + ] +} diff --git a/packages/e2e/src/DynamicBenchmarker.ts b/packages/benchmark/src/DynamicBenchmarker.ts similarity index 98% rename from packages/e2e/src/DynamicBenchmarker.ts rename to packages/benchmark/src/DynamicBenchmarker.ts index e4780436e..cfd97afe1 100644 --- a/packages/e2e/src/DynamicBenchmarker.ts +++ b/packages/benchmark/src/DynamicBenchmarker.ts @@ -4,9 +4,9 @@ import os from "os"; import { Driver, WorkerConnector, WorkerServer } from "tgrid"; import { HashMap, hash } from "tstl"; -import { IBenchmarkEvent } from "./structures/IBenchmarkEvent"; -import { IBenchmarkMaster } from "./structures/IBenchmarkMaster"; -import { IBenchmarkServant } from "./structures/IBenchmarkServant"; +import { IBenchmarkEvent } from "./IBenchmarkEvent"; +import { IBenchmarkMaster } from "./internal/IBenchmarkMaster"; +import { IBenchmarkServant } from "./internal/IBenchmarkServant"; /** * Dynamic benchmark executor running prefixed functions. diff --git a/packages/e2e/src/structures/IBenchmarkEvent.ts b/packages/benchmark/src/IBenchmarkEvent.ts similarity index 100% rename from packages/e2e/src/structures/IBenchmarkEvent.ts rename to packages/benchmark/src/IBenchmarkEvent.ts diff --git a/packages/benchmark/src/index.ts b/packages/benchmark/src/index.ts new file mode 100644 index 000000000..8e5a945e7 --- /dev/null +++ b/packages/benchmark/src/index.ts @@ -0,0 +1,2 @@ +export * from "./DynamicBenchmarker"; +export * from "./IBenchmarkEvent"; diff --git a/packages/e2e/src/structures/IBenchmarkMaster.ts b/packages/benchmark/src/internal/IBenchmarkMaster.ts similarity index 75% rename from packages/e2e/src/structures/IBenchmarkMaster.ts rename to packages/benchmark/src/internal/IBenchmarkMaster.ts index 61ba11e28..504e4e062 100644 --- a/packages/e2e/src/structures/IBenchmarkMaster.ts +++ b/packages/benchmark/src/internal/IBenchmarkMaster.ts @@ -1,4 +1,3 @@ -export interface IBenchmarkMaster {} export interface IBenchmarkMaster { filter: (name: string) => boolean; progress: (current: number) => void; diff --git a/packages/e2e/src/structures/IBenchmarkServant.ts b/packages/benchmark/src/internal/IBenchmarkServant.ts similarity index 71% rename from packages/e2e/src/structures/IBenchmarkServant.ts rename to packages/benchmark/src/internal/IBenchmarkServant.ts index 5080eb64f..8f803b46d 100644 --- a/packages/e2e/src/structures/IBenchmarkServant.ts +++ b/packages/benchmark/src/internal/IBenchmarkServant.ts @@ -1,4 +1,4 @@ -import { IBenchmarkEvent } from "./IBenchmarkEvent"; +import { IBenchmarkEvent } from "../IBenchmarkEvent"; export interface IBenchmarkServant { execute(props: { diff --git a/packages/benchmark/test/api/HttpError.ts b/packages/benchmark/test/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/packages/benchmark/test/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/packages/benchmark/test/api/IConnection.ts b/packages/benchmark/test/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/packages/benchmark/test/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/packages/benchmark/test/api/Primitive.ts b/packages/benchmark/test/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/packages/benchmark/test/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/packages/benchmark/test/api/functional/bbs/articles/index.ts b/packages/benchmark/test/api/functional/bbs/articles/index.ts new file mode 100644 index 000000000..51de052d2 --- /dev/null +++ b/packages/benchmark/test/api/functional/bbs/articles/index.ts @@ -0,0 +1,327 @@ +/** + * @packageDocumentation + * @module api.functional.bbs.articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection } from "@nestia/fetcher"; +import { NestiaSimulator } from "@nestia/fetcher/lib/NestiaSimulator"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; +import typia from "typia"; +import type { Format } from "typia/lib/tags/Format"; + +import type { IBbsArticle } from "../../../structures/bbs/IBbsArticle"; +import type { IPage } from "../../../structures/common/IPage"; + +/** + * List up entire articles, but paginated and summarized. + * + * This method is for listing up summarized articles with pagination. + * + * If you want, you can search and sort articles with specific conditions. + * + * @param section Target section + * @param input Pagination request info with searching and sorting options + * @returns Paginated articles with summarization + * + * @controller BbsArticlesController.index + * @path PATCH /bbs/articles/:section + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function index( + connection: IConnection, + section: string, + input: IBbsArticle.IRequest, +): Promise { + return !!connection.simulate + ? index.simulate(connection, section, input) + : PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...index.METADATA, + template: index.METADATA.path, + path: index.path(section), + }, + input, + ); +} +export namespace index { + export type Input = IBbsArticle.IRequest; + export type Output = IPage; + + export const METADATA = { + method: "PATCH", + path: "/bbs/articles/:section", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string) => + `/bbs/articles/${encodeURIComponent(section ?? "null")}`; + export const random = ( + g?: Partial, + ): IPage => + typia.random>(g); + export const simulate = ( + connection: IConnection, + section: string, + input: IBbsArticle.IRequest, + ): Output => { + const assert = NestiaSimulator.assert({ + method: METADATA.method, + host: connection.host, + path: path(section), + contentType: "application/json", + }); + assert.param("section")(() => typia.assert(section)); + assert.body(() => typia.assert(input)); + return random( + "object" === typeof connection.simulate && null !== connection.simulate + ? connection.simulate + : undefined, + ); + }; +} + +/** + * Get an article with detailed info. + * + * Open an article with detailed info, increasing reading count. + * + * @param section Target section + * @param id Target articles id + * @returns Detailed article info + * + * @controller BbsArticlesController.at + * @path GET /bbs/articles/:section/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function at( + connection: IConnection, + section: string, + id: string, +): Promise { + return !!connection.simulate + ? at.simulate(connection, section, id) + : PlainFetcher.fetch(connection, { + ...at.METADATA, + template: at.METADATA.path, + path: at.path(section, id), + }); +} +export namespace at { + export type Output = IBbsArticle; + + export const METADATA = { + method: "GET", + path: "/bbs/articles/:section/:id", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, id: string) => + `/bbs/articles/${encodeURIComponent(section ?? "null")}/${encodeURIComponent(id ?? "null")}`; + export const random = (g?: Partial): IBbsArticle => + typia.random(g); + export const simulate = ( + connection: IConnection, + section: string, + id: string, + ): Output => { + const assert = NestiaSimulator.assert({ + method: METADATA.method, + host: connection.host, + path: path(section, id), + contentType: "application/json", + }); + assert.param("section")(() => typia.assert(section)); + assert.param("id")(() => typia.assert(id)); + return random( + "object" === typeof connection.simulate && null !== connection.simulate + ? connection.simulate + : undefined, + ); + }; +} + +/** + * Create a new article. + * + * Create a new article and returns its detailed record info. + * + * @param section Target section + * @param input New article info + * @returns Newly created article info + * + * @controller BbsArticlesController.create + * @path POST /bbs/articles/:section + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function create( + connection: IConnection, + section: string, + input: IBbsArticle.ICreate, +): Promise { + return !!connection.simulate + ? create.simulate(connection, section, input) + : PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...create.METADATA, + template: create.METADATA.path, + path: create.path(section), + }, + input, + ); +} +export namespace create { + export type Input = IBbsArticle.ICreate; + export type Output = IBbsArticle; + + export const METADATA = { + method: "POST", + path: "/bbs/articles/:section", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string) => + `/bbs/articles/${encodeURIComponent(section ?? "null")}`; + export const random = (g?: Partial): IBbsArticle => + typia.random(g); + export const simulate = ( + connection: IConnection, + section: string, + input: IBbsArticle.ICreate, + ): Output => { + const assert = NestiaSimulator.assert({ + method: METADATA.method, + host: connection.host, + path: path(section), + contentType: "application/json", + }); + assert.param("section")(() => typia.assert(section)); + assert.body(() => typia.assert(input)); + return random( + "object" === typeof connection.simulate && null !== connection.simulate + ? connection.simulate + : undefined, + ); + }; +} + +/** + * Update article. + * + * When updating, this BBS system does not overwrite the content, but accumulate it. + * Therefore, whenever an article being updated, length of {@link IBbsArticle.snapshots} + * would be increased and accumulated. + * + * @param section Target section + * @param id Target articles id + * @param input Content to update + * @returns Newly created content info + * + * @controller BbsArticlesController.update + * @path PUT /bbs/articles/:section/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function update( + connection: IConnection, + section: string, + id: string & Format<"uuid">, + input: IBbsArticle.IUpdate, +): Promise { + return !!connection.simulate + ? update.simulate(connection, section, id, input) + : PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...update.METADATA, + template: update.METADATA.path, + path: update.path(section, id), + }, + input, + ); +} +export namespace update { + export type Input = IBbsArticle.IUpdate; + export type Output = IBbsArticle.ISnapshot; + + export const METADATA = { + method: "PUT", + path: "/bbs/articles/:section/:id", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, id: string & Format<"uuid">) => + `/bbs/articles/${encodeURIComponent(section ?? "null")}/${encodeURIComponent(id ?? "null")}`; + export const random = ( + g?: Partial, + ): IBbsArticle.ISnapshot => typia.random(g); + export const simulate = ( + connection: IConnection, + section: string, + id: string & Format<"uuid">, + input: IBbsArticle.IUpdate, + ): Output => { + const assert = NestiaSimulator.assert({ + method: METADATA.method, + host: connection.host, + path: path(section, id), + contentType: "application/json", + }); + assert.param("section")(() => typia.assert(section)); + assert.param("id")(() => typia.assert(id)); + assert.body(() => typia.assert(input)); + return random( + "object" === typeof connection.simulate && null !== connection.simulate + ? connection.simulate + : undefined, + ); + }; +} diff --git a/packages/benchmark/test/api/functional/bbs/index.ts b/packages/benchmark/test/api/functional/bbs/index.ts new file mode 100644 index 000000000..7a891f888 --- /dev/null +++ b/packages/benchmark/test/api/functional/bbs/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.bbs + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as articles from "./articles"; diff --git a/packages/benchmark/test/api/functional/index.ts b/packages/benchmark/test/api/functional/index.ts new file mode 100644 index 000000000..26113199a --- /dev/null +++ b/packages/benchmark/test/api/functional/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as bbs from "./bbs"; diff --git a/packages/benchmark/test/api/index.ts b/packages/benchmark/test/api/index.ts new file mode 100644 index 000000000..1705f43c8 --- /dev/null +++ b/packages/benchmark/test/api/index.ts @@ -0,0 +1,4 @@ +import * as api from "./module"; + +export * from "./module"; +export default api; diff --git a/packages/benchmark/test/api/module.ts b/packages/benchmark/test/api/module.ts new file mode 100644 index 000000000..404ea3e68 --- /dev/null +++ b/packages/benchmark/test/api/module.ts @@ -0,0 +1,4 @@ +export type * from "./IConnection"; +export * from "./HttpError"; + +export * as functional from "./functional"; diff --git a/packages/benchmark/test/api/structures/bbs/IBbsArticle.ts b/packages/benchmark/test/api/structures/bbs/IBbsArticle.ts new file mode 100644 index 000000000..b361685c6 --- /dev/null +++ b/packages/benchmark/test/api/structures/bbs/IBbsArticle.ts @@ -0,0 +1,140 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "../common/IAttachmentFile"; +import { IPage } from "../common/IPage"; + +/** + * BBS article. + */ +export interface IBbsArticle { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Section code. + */ + section: string; + + /** + * Name of nickname of writer. + */ + writer: string; + + /** + * List of snapshot contents. + * + * Whenever updating an article, its contents would be accumulated. + */ + snapshots: IBbsArticle.ISnapshot[]; + + /** + * Creation time of the article. + */ + created_at: string & tags.Format<"date-time">; +} + +export namespace IBbsArticle { + /** + * Page request info with some options. + */ + export interface IRequest extends IPage.IRequest { + /** + * Searching options. + */ + search?: IRequest.ISearch; + + /** + * Sorting options. + * + * The plus sign means ASC and minus sign means DESC. + */ + sort?: IPage.Sort; + } + export namespace IRequest { + /** + * Searching options. + */ + export interface ISearch { + writer?: string; + title?: string; + body?: string; + } + + /** + * List of sortable columns. + */ + export type SortableColumns = + | "writer" + | "title" + | "created_at" + | "updated_at"; + } + + /** + * Summarized info. + */ + export interface ISummary { + id: string; + writer: string; + title: string; + created_at: string; + updated_at: string; + } + + /** + * Content info. + */ + export interface ISnapshot extends Omit { + /** + * Primary key of individual content. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of this content. + */ + created_at: string & tags.Format<"date-time">; + } + + /** + * Store info. + */ + export interface ICreate extends IUpdate { + /** + * Name or nickname of the writer. + */ + writer: string; + } + + /** + * Update info. + */ + export interface IUpdate { + /** + * Title of the article. + */ + title: string; + + /** + * Content body. + */ + body: string; + + /** + * Format of the content body. + */ + format: "md" | "html" | "txt"; + + /** + * List of files (to be) attached. + */ + files: IAttachmentFile[]; + + /** + * Password of the article. + */ + password: string; + } +} diff --git a/packages/benchmark/test/api/structures/common/IAttachmentFile.ts b/packages/benchmark/test/api/structures/common/IAttachmentFile.ts new file mode 100644 index 000000000..3fdf6dcd9 --- /dev/null +++ b/packages/benchmark/test/api/structures/common/IAttachmentFile.ts @@ -0,0 +1,7 @@ +import { tags } from "typia"; + +export interface IAttachmentFile { + name: null | (string & tags.MinLength<1> & tags.MaxLength<255>); + extension: null | (string & tags.MinLength<1> & tags.MaxLength<8>); + url: string & tags.Format<"url">; +} diff --git a/packages/benchmark/test/api/structures/common/IPage.ts b/packages/benchmark/test/api/structures/common/IPage.ts new file mode 100644 index 000000000..d2507c289 --- /dev/null +++ b/packages/benchmark/test/api/structures/common/IPage.ts @@ -0,0 +1,74 @@ +import { tags } from "typia"; + +/** + * A page. + * + * Collection of records with pagination indformation. + * + * @author Samchon + */ +export interface IPage { + /** + * Page information. + */ + pagination: IPage.IPagination; + + /** + * List of records. + */ + data: T[]; +} +export namespace IPage { + /** + * Page information. + */ + export interface IPagination { + /** + * Current page number. + */ + current: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit: number & tags.Type<"uint32">; + + /** + * Count of total records in database. + */ + records: number & tags.Type<"uint32">; + + /** + * Number of total pages. + * + * Equal to {@link records} / {@link limit} with ceiling. + */ + pages: number & tags.Type<"uint32">; + } + + /** + * Page request data + */ + export interface IRequest { + /** + * Page number. + */ + page?: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + */ + limit?: number & tags.Type<"uint32">; + } + + /** + * Sorting column specialization. + * + * The plus means ascending order and the minus means descending order. + */ + export type Sort = Array< + `-${Literal}` | `+${Literal}` + >; +} diff --git a/packages/benchmark/test/controllers/bbs/BbsArticleModule.ts b/packages/benchmark/test/controllers/bbs/BbsArticleModule.ts new file mode 100644 index 000000000..b130ca707 --- /dev/null +++ b/packages/benchmark/test/controllers/bbs/BbsArticleModule.ts @@ -0,0 +1,8 @@ +import { Module } from "@nestjs/common"; + +import { BbsArticlesController } from "./BbsArticlesController"; + +@Module({ + controllers: [BbsArticlesController], +}) +export class BbsArticleModule {} diff --git a/packages/benchmark/test/controllers/bbs/BbsArticlesController.ts b/packages/benchmark/test/controllers/bbs/BbsArticlesController.ts new file mode 100644 index 000000000..40a1c4c2b --- /dev/null +++ b/packages/benchmark/test/controllers/bbs/BbsArticlesController.ts @@ -0,0 +1,97 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "../../api/structures/bbs/IBbsArticle"; +import { IPage } from "../../api/structures/common/IPage"; + +/** + * This is a fake controller. + * + * Remove it or make it to be real one. + */ +@Controller("bbs/articles/:section") +export class BbsArticlesController { + /** + * List up entire articles, but paginated and summarized. + * + * This method is for listing up summarized articles with pagination. + * + * If you want, you can search and sort articles with specific conditions. + * + * @param section Target section + * @param input Pagination request info with searching and sorting options + * @returns Paginated articles with summarization + */ + @core.TypedRoute.Patch() + public async index( + @core.TypedParam("section") section: string, + @core.TypedBody() input: IBbsArticle.IRequest, + ): Promise> { + section; + input; + return typia.random>(); + } + + /** + * Get an article with detailed info. + * + * Open an article with detailed info, increasing reading count. + * + * @param section Target section + * @param id Target articles id + * @returns Detailed article info + */ + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("section") section: string, + @core.TypedParam("id") id: string, + ): Promise { + section; + id; + return typia.random(); + } + + /** + * Create a new article. + * + * Create a new article and returns its detailed record info. + * + * @param section Target section + * @param input New article info + * @returns Newly created article info + */ + @core.TypedRoute.Post() + public async create( + @core.TypedParam("section") section: string, + @core.TypedBody() input: IBbsArticle.ICreate, + ): Promise { + section; + input; + return typia.random(); + } + + /** + * Update article. + * + * When updating, this BBS system does not overwrite the content, but accumulate it. + * Therefore, whenever an article being updated, length of {@link IBbsArticle.snapshots} + * would be increased and accumulated. + * + * @param section Target section + * @param id Target articles id + * @param input Content to update + * @returns Newly created content info + */ + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("section") section: string, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IUpdate, + ): Promise { + section; + id; + input; + return typia.random(); + } +} diff --git a/packages/benchmark/test/features/test_api_bbs_article_at.ts b/packages/benchmark/test/features/test_api_bbs_article_at.ts new file mode 100644 index 000000000..6f5b85d30 --- /dev/null +++ b/packages/benchmark/test/features/test_api_bbs_article_at.ts @@ -0,0 +1,47 @@ +import { TestValidator } from "@nestia/e2e"; +import { v4 } from "uuid"; + +import api from "../api"; +import { IBbsArticle } from "../api/structures/bbs/IBbsArticle"; + +export async function test_api_bbs_article_at( + connection: api.IConnection, +): Promise { + // STORE A NEW ARTICLE + const stored: IBbsArticle = await api.functional.bbs.articles.create( + connection, + "general", + { + writer: "Robot", + title: "Hello, world!", + body: "Hello, I'm test automation robot", + format: "txt", + files: [ + { + name: "logo", + extension: "png", + url: "https://somewhere.com/logo.png", + }, + ], + password: "1234", + }, + ); + + // READ IT + const read: IBbsArticle = await api.functional.bbs.articles.at( + connection, + stored.section, + stored.id, + ); + + // CHECK EQUALITY + TestValidator.equals("stored vs. read")(stored)(read); + + // TRY 404 ERRORS + await TestValidator.error("wrong section")(() => + api.functional.bbs.articles.at(connection, v4(), stored.id), + ); + await TestValidator.error("wrong id")(() => + api.functional.bbs.articles.at(connection, stored.section, v4()), + ); +} diff --git a/packages/benchmark/test/features/test_api_bbs_article_create.ts b/packages/benchmark/test/features/test_api_bbs_article_create.ts new file mode 100644 index 000000000..b18d7d6a3 --- /dev/null +++ b/packages/benchmark/test/features/test_api_bbs_article_create.ts @@ -0,0 +1,37 @@ +import { RandomGenerator, TestValidator } from "@nestia/e2e"; +import { v4 } from "uuid"; + +import api from "../api"; +import { IBbsArticle } from "../api/structures/bbs/IBbsArticle"; + +export async function test_api_bbs_article_create( + connection: api.IConnection, +): Promise { + // STORE A NEW ARTICLE + const stored: IBbsArticle = await api.functional.bbs.articles.create( + connection, + "general", + { + writer: RandomGenerator.name(), + title: RandomGenerator.paragraph(3)(), + body: RandomGenerator.content(8)()(), + format: "txt", + files: [ + { + name: "logo", + extension: "png", + url: "https://somewhere.com/logo.png", + }, + ], + password: v4(), + }, + ); + + // READ THE DATA AGAIN + const read: IBbsArticle = await api.functional.bbs.articles.at( + connection, + stored.section, + stored.id, + ); + TestValidator.equals("created")(stored)(read); +} diff --git a/packages/benchmark/test/features/test_api_bbs_article_index_search.ts b/packages/benchmark/test/features/test_api_bbs_article_index_search.ts new file mode 100644 index 000000000..ceadece70 --- /dev/null +++ b/packages/benchmark/test/features/test_api_bbs_article_index_search.ts @@ -0,0 +1,67 @@ +import { ArrayUtil, RandomGenerator, TestValidator } from "@nestia/e2e"; + +import api from "../api"; +import { IBbsArticle } from "../api/structures/bbs/IBbsArticle"; +import { IPage } from "../api/structures/common/IPage"; + +export async function test_api_bbs_article_index_search( + connection: api.IConnection, +): Promise { + // GENERATE 100 ARTICLES + const section: string = "general"; + const articles: IBbsArticle[] = await ArrayUtil.asyncRepeat(100)(() => + api.functional.bbs.articles.create(connection, section, { + writer: RandomGenerator.name(), + title: RandomGenerator.paragraph(4)(), + body: RandomGenerator.content(3)()(), + format: "txt", + files: [], + password: RandomGenerator.alphabets(8), + }), + ); + + // GET ENTIRE DATA + const total: IPage = + await api.functional.bbs.articles.index(connection, section, { + limit: articles.length, + sort: ["-created_at"], + }); + + // PREPARE SEARCH FUNCTION + const search = TestValidator.search("BbsArticleProvider.index()")( + async (input: IBbsArticle.IRequest.ISearch) => { + const page: IPage = + await api.functional.bbs.articles.index(connection, section, { + limit: articles.length, + search: input, + sort: ["-created_at"], + }); + return page.data; + }, + )(total.data, 10); + + // SEARCH TITLE + await search({ + fields: ["title"], + values: (article) => [article.title], + request: ([title]) => ({ title }), + filter: (article, [title]) => article.title.includes(title), + }); + + // SEARCH WRITER + await search({ + fields: ["writer"], + values: (article) => [article.writer], + request: ([writer]) => ({ writer }), + filter: (article, [writer]) => article.writer.includes(writer), + }); + + // SEARCH BOTH OF THEM + await search({ + fields: ["title", "writer"], + values: (article) => [article.title, article.writer], + request: ([title, writer]) => ({ title, writer }), + filter: (article, [title, writer]) => + article.title.includes(title) && article.writer.includes(writer), + }); +} diff --git a/packages/benchmark/test/features/test_api_bbs_article_index_sort.ts b/packages/benchmark/test/features/test_api_bbs_article_index_sort.ts new file mode 100644 index 000000000..13d82c9a7 --- /dev/null +++ b/packages/benchmark/test/features/test_api_bbs_article_index_sort.ts @@ -0,0 +1,55 @@ +import { + ArrayUtil, + GaffComparator, + RandomGenerator, + TestValidator, +} from "@nestia/e2e"; + +import api from "../api"; +import { IBbsArticle } from "../api/structures/bbs/IBbsArticle"; +import { IPage } from "../api/structures/common/IPage"; + +export async function test_api_bbs_article_index_sort( + connection: api.IConnection, +): Promise { + // GENERATE 100 ARTICLES + const section: string = "general"; + await ArrayUtil.asyncRepeat(100)(() => + api.functional.bbs.articles.create(connection, section, { + writer: RandomGenerator.name(), + title: RandomGenerator.paragraph(5)(), + body: RandomGenerator.content(8)()(), + format: "txt", + files: [], + password: RandomGenerator.alphabets(8), + }), + ); + + // PREPARE VALIDATOR + const validator = TestValidator.sort("BbsArticleProvider.index()")(async ( + sort: IPage.Sort, + ) => { + const page: IPage = + await api.functional.bbs.articles.index(connection, section, { + limit: 100, + sort, + }); + return page.data; + }); + + // DO VALIDATE + const components = [ + validator("created_at")(GaffComparator.dates((x) => x.created_at)), + validator("updated_at")(GaffComparator.dates((x) => x.updated_at)), + validator("title")(GaffComparator.strings((x) => x.title)), + validator("writer")(GaffComparator.strings((x) => x.writer)), + validator( + "writer", + "title", + )(GaffComparator.strings((x) => [x.writer, x.title])), + ]; + for (const comp of components) { + await comp("+", false); + await comp("-", false); + } +} diff --git a/packages/benchmark/test/features/test_api_bbs_article_update.ts b/packages/benchmark/test/features/test_api_bbs_article_update.ts new file mode 100644 index 000000000..f2e268ff7 --- /dev/null +++ b/packages/benchmark/test/features/test_api_bbs_article_update.ts @@ -0,0 +1,62 @@ +import { RandomGenerator, TestValidator } from "@nestia/e2e"; +import { v4 } from "uuid"; + +import api from "../api"; +import { IBbsArticle } from "../api/structures/bbs/IBbsArticle"; + +export async function test_api_bbs_article_update( + connection: api.IConnection, +): Promise { + // STORE A NEW ARTICLE + const password: string = v4(); + const article: IBbsArticle = await api.functional.bbs.articles.create( + connection, + "general", + { + writer: RandomGenerator.name(), + title: RandomGenerator.paragraph(3)(), + body: RandomGenerator.content(8)()(), + format: "txt", + files: [ + { + name: "logo", + extension: "png", + url: "https://somewhere.com/logo.png", + }, + ], + password, + }, + ); + + // UPDATE WITH EXACT PASSWORD + const content: IBbsArticle.ISnapshot = + await api.functional.bbs.articles.update( + connection, + article.section, + article.id, + { + title: RandomGenerator.paragraph(3)(), + body: RandomGenerator.content(8)()(), + format: "txt", + files: [], + password, + }, + ); + article.snapshots.push(content); + + // TRY UPDATE WITH WRONG PASSWORD + await TestValidator.error("update with wrong password")(() => + api.functional.bbs.articles.update( + connection, + article.section, + article.id, + { + title: RandomGenerator.paragraph(5)(), + body: RandomGenerator.content(8)()(), + format: "txt", + files: [], + password: v4(), + }, + ), + ); +} diff --git a/packages/benchmark/test/index.ts b/packages/benchmark/test/index.ts new file mode 100644 index 000000000..06433d187 --- /dev/null +++ b/packages/benchmark/test/index.ts @@ -0,0 +1,26 @@ +import { DynamicBenchmarker } from "@nestia/benchmark"; +import { NestFactory } from "@nestjs/core"; +import fs from "fs"; + +import { BbsArticleModule } from "./controllers/bbs/BbsArticleModule"; + +const main = async (): Promise => { + // PREPARE SERVER + const app = await NestFactory.create(BbsArticleModule, { logger: false }); + await app.listen(3_000); + + const report: DynamicBenchmarker.IReport = await DynamicBenchmarker.master({ + servant: `${__dirname}/servant.js`, + count: 1024, + threads: 4, + simultaneous: 32, + stdio: "ignore", + }); + await app.close(); + await fs.promises.writeFile( + "BENCHMARK.md", + DynamicBenchmarker.markdown(report), + "utf8", + ); +}; +main().catch(console.error); diff --git a/packages/benchmark/test/nestia.config.ts b/packages/benchmark/test/nestia.config.ts new file mode 100644 index 000000000..af9583121 --- /dev/null +++ b/packages/benchmark/test/nestia.config.ts @@ -0,0 +1,12 @@ +// nestia configuration file +import type sdk from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; + +import { BbsArticleModule } from "./controllers/bbs/BbsArticleModule"; + +const NESTIA_CONFIG: sdk.INestiaConfig = { + input: () => NestFactory.create(BbsArticleModule), + output: "src/api", + primitive: false, +}; +export default NESTIA_CONFIG; diff --git a/packages/benchmark/test/servant.ts b/packages/benchmark/test/servant.ts new file mode 100644 index 000000000..d566b8a83 --- /dev/null +++ b/packages/benchmark/test/servant.ts @@ -0,0 +1,13 @@ +import { DynamicBenchmarker } from "@nestia/benchmark"; + +DynamicBenchmarker.servant({ + connection: { + host: `http://127.0.0.1:3000`, + }, + location: `${__dirname}/features`, + parameters: (connection) => [connection], + prefix: "test_api_", +}).catch((exp) => { + console.error(exp); + process.exit(-1); +}); diff --git a/packages/benchmark/test/tsconfig.json b/packages/benchmark/test/tsconfig.json new file mode 100644 index 000000000..3c8a1809c --- /dev/null +++ b/packages/benchmark/test/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../bin", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "paths": { + "@nestia/benchmark": ["../src/index.ts"], + }, + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ] + }, + "include": ["./", "../src"] +} \ No newline at end of file diff --git a/packages/benchmark/tsconfig.json b/packages/benchmark/tsconfig.json new file mode 100644 index 000000000..fa362e8f7 --- /dev/null +++ b/packages/benchmark/tsconfig.json @@ -0,0 +1,86 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "ES5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "lib": [ + "DOM", + "ES2015" + ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */// "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */// "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "./lib", /* Specify an output folder for all emitted files. */// "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + }, + "include": ["./src"] +} \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index b0b116352..10a1975e4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.5.0", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.5.0.tgz", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.0", diff --git a/packages/e2e/package.json b/packages/e2e/package.json index eba040c35..d88153aeb 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -1,14 +1,17 @@ { "name": "@nestia/e2e", - "version": "0.6.0", + "version": "0.7.0", "description": "E2E test utilify functions", "main": "lib/index.js", + "typings": "lib/index.d.ts", "scripts": { - "build": "rimraf lib && tsc", - "dev": "npm run build -- --watch", - "eslint": "eslint src", + "build": "npm run build:main && npm run build:test", + "build:main": "rimraf lib && tsc", + "build:test": "rimraf bin && tsc -p test/tsconfig.json", + "dev": "npm run build:test -- --watch", + "eslint": "eslint src && eslint test", "prepare": "ts-patch install && typia patch", - "test": "node lib/test" + "test": "node bin/test" }, "repository": { "type": "git", @@ -30,28 +33,19 @@ "homepage": "https://nestia.io", "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@types/cli": "^0.11.21", "@types/node": "^18.11.18", "@typescript-eslint/eslint-plugin": "^5.57.0", "@typescript-eslint/parser": "^5.57.0", "rimraf": "^4.1.2", "ts-node": "^10.9.1", "ts-patch": "^3.2.1", - "typescript": "^5.5.2", - "typia": "^6.4.2" - }, - "dependencies": { - "@nestia/fetcher": "^3.2.2", - "chalk": "^4.1.2", - "cli": "^1.0.1", - "tgrid": "^1.0.2", - "tstl": "^3.0.0" + "typescript": "^5.5.3", + "typescript-transform-paths": "^3.4.7", + "typia": "^6.4.3" }, "files": [ "lib", "src", - "!lib/test", - "!src/test", "README.md", "LICENSE", "package.json" diff --git a/packages/e2e/src/DynamicExecutor.ts b/packages/e2e/src/DynamicExecutor.ts index 2af872c68..e4f4e3483 100644 --- a/packages/e2e/src/DynamicExecutor.ts +++ b/packages/e2e/src/DynamicExecutor.ts @@ -1,9 +1,6 @@ -import chalk from "chalk"; import fs from "fs"; import NodePath from "path"; -import { StopWatch } from "./StopWatch"; - /** * Dynamic Executor running prefixed functions. * @@ -36,7 +33,7 @@ export namespace DynamicExecutor { /** * Options for dynamic executor. */ - export interface IOptions { + export interface IProps { /** * Prefix of function name. * @@ -46,6 +43,11 @@ export namespace DynamicExecutor { */ prefix: string; + /** + * Location of the test functions. + */ + location: string; + /** * Get parameters of a function. * @@ -54,6 +56,15 @@ export namespace DynamicExecutor { */ parameters: (name: string) => Parameters; + /** + * On complete function. + * + * Listener of completion of a test function. + * + * @param exec Execution result of a test function + */ + onComplete?: (exec: IExecution) => void; + /** * Filter function whether to run or not. * @@ -80,13 +91,6 @@ export namespace DynamicExecutor { paramters: Parameters, ) => Promise; - /** - * Whether to show elapsed time on `console` or not. - * - * @default true - */ - showElapsedTime?: boolean; - /** * Extension of dynamic functions. * @@ -107,38 +111,42 @@ export namespace DynamicExecutor { /** * Execution results of dynamic functions. */ - executions: IReport.IExecution[]; + executions: IExecution[]; /** * Total elapsed time. */ time: number; } - export namespace IReport { + + /** + * Execution of a test function. + */ + export interface IExecution { /** - * Execution result of a dynamic function. + * Name of function. */ - export interface IExecution { - /** - * Name of function. - */ - name: string; + name: string; - /** - * Location path of the function. - */ - location: string; + /** + * Location path of the function. + */ + location: string; - /** - * Error when occured. - */ - error: Error | null; + /** + * Error when occured. + */ + error: Error | null; - /** - * Elapsed time. - */ - time: number; - } + /** + * Elapsed time. + */ + started_at: string; + + /** + * Completion time. + */ + completed_at: string; } /** @@ -148,18 +156,12 @@ export namespace DynamicExecutor { * Otherwise, {@link validate} mode does not terminate when error occurs, but * just archive the error log. * - * @param options Options of dynamic executor - * @returns Runner of dynamic functions with specific location + * @param props Properties of dynamic execution + * @returns Report of dynamic test functions execution */ - export const assert = - (options: IOptions) => - /** - * Run dynamic executor. - * - * @param path Location of prefixed functions - */ - (path: string): Promise => - main(options)(true)(path); + export const assert = ( + props: IProps, + ): Promise => main(true)(props); /** * Prepare dynamic executor in loose mode. @@ -168,33 +170,27 @@ export namespace DynamicExecutor { * Instead, the error would be archived and returns as a list. Otherwise, * {@link assert} mode terminates the program directly when error occurs. * - * @param options Options of dynamic executor - * @returns Runner of dynamic functions with specific location + * @param props Properties of dynamic executor + * @returns Report of dynamic test functions execution */ - export const validate = - (options: IOptions) => - /** - * Run dynamic executor. - * - * @param path Location of prefix functions - * @returns List of errors - */ - (path: string): Promise => - main(options)(false)(path); + export const validate = ( + props: IProps, + ): Promise => main(false)(props); const main = - (options: IOptions) => (assert: boolean) => - async (path: string) => { + async ( + props: IProps, + ): Promise => { const report: IReport = { - location: path, + location: props.location, time: Date.now(), executions: [], }; - const executor = execute(options)(report)(assert); - const iterator = iterate(options.extension ?? "js")(executor); - await iterator(path); + const executor = execute(props)(report)(assert); + const iterator = iterate(props.extension ?? "js")(executor); + await iterator(props.location); report.time = Date.now() - report.time; return report; @@ -224,54 +220,42 @@ export namespace DynamicExecutor { }; const execute = - (options: IOptions) => + (props: IProps) => (report: IReport) => (assert: boolean) => async (location: string, modulo: Module): Promise => { for (const [key, closure] of Object.entries(modulo)) { if ( - key.substring(0, options.prefix.length) !== options.prefix || + key.substring(0, props.prefix.length) !== props.prefix || typeof closure !== "function" || - (options.filter && options.filter(key) === false) + (props.filter && props.filter(key) === false) ) continue; const func = async () => { - if (options.wrapper !== undefined) - await options.wrapper(key, closure, options.parameters(key)); - else await closure(...options.parameters(key)); + if (props.wrapper !== undefined) + await props.wrapper(key, closure, props.parameters(key)); + else await closure(...props.parameters(key)); }; - const label: string = chalk.greenBright(key); - const result: IReport.IExecution = { + const result: IExecution = { name: key, location, error: null, - time: Date.now(), + started_at: new Date().toISOString(), + completed_at: new Date().toISOString(), }; report.executions.push(result); try { - if (options.showElapsedTime === false) { - await func(); - result.time = Date.now() - result.time; - console.log(` - ${label}`); - } else { - result.time = (await StopWatch.measure(func))[1]; - console.log( - ` - ${label}: ${chalk.yellowBright( - result.time.toLocaleString(), - )} ms`, - ); - } + await func(); + result.completed_at = new Date().toISOString(); } catch (exp) { - result.time = Date.now() - result.time; result.error = exp as Error; - - console.log( - ` - ${label} -> ${chalk.redBright((exp as Error)?.name)}`, - ); if (assert === true) throw exp; + } finally { + result.completed_at = new Date().toISOString(); + if (props.onComplete) props.onComplete(result); } } }; diff --git a/packages/e2e/src/GaffComparator.ts b/packages/e2e/src/GaffComparator.ts index 51efc8bfc..22b724274 100644 --- a/packages/e2e/src/GaffComparator.ts +++ b/packages/e2e/src/GaffComparator.ts @@ -17,7 +17,7 @@ export namespace GaffComparator { */ export const strings = (getter: (input: T) => string | string[]) => - (x: T, y: T) => { + (x: T, y: T): number => { const a: string[] = wrap(getter(x)); const b: string[] = wrap(getter(y)); @@ -33,7 +33,7 @@ export namespace GaffComparator { */ export const dates = (getter: (input: T) => string | string[]) => - (x: T, y: T) => { + (x: T, y: T): number => { const take = (v: T) => wrap(getter(v)).map((str) => new Date(str).getTime()); const a: number[] = take(x); @@ -51,7 +51,7 @@ export namespace GaffComparator { */ export const numbers = (closure: (input: T) => number | number[]) => - (x: T, y: T) => { + (x: T, y: T): number => { const a: number[] = wrap(closure(x)); const b: number[] = wrap(closure(y)); @@ -59,11 +59,6 @@ export namespace GaffComparator { return idx !== -1 ? a[idx] - b[idx] : 0; }; - function compare(x: string, y: string) { - return x.localeCompare(y); - } - - function wrap(elem: T | T[]): T[] { - return Array.isArray(elem) ? elem : [elem]; - } + const compare = (x: string, y: string) => x.localeCompare(y); + const wrap = (elem: T | T[]): T[] => (Array.isArray(elem) ? elem : [elem]); } diff --git a/packages/e2e/src/RandomGenerator.ts b/packages/e2e/src/RandomGenerator.ts index 60a7611e4..2679a5d29 100644 --- a/packages/e2e/src/RandomGenerator.ts +++ b/packages/e2e/src/RandomGenerator.ts @@ -1,6 +1,3 @@ -import { back_inserter, randint } from "tstl"; -import { ranges } from "tstl"; - /** * Random data generator. * @@ -146,9 +143,10 @@ export namespace RandomGenerator { export const sample = (array: T[]) => (count: number): T[] => { - const ret: T[] = []; - ranges.sample(array, back_inserter(ret), count); - return ret; + count = Math.min(count, array.length); + const indexes: Set = new Set(); + while (indexes.size < count) indexes.add(randint(0, array.length - 1)); + return Array.from(indexes).map((index) => array[index]); }; /** @@ -159,3 +157,6 @@ export namespace RandomGenerator { */ export const pick = (array: T[]): T => array[randint(0, array.length - 1)]; } + +const randint = (min: number, max: number): number => + Math.floor(Math.random() * (max - min + 1)) + min; diff --git a/packages/e2e/src/StopWatch.ts b/packages/e2e/src/StopWatch.ts deleted file mode 100644 index d70c0d5ae..000000000 --- a/packages/e2e/src/StopWatch.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Elapsed time measurement utility. - * - * @author Sachon - */ -export namespace StopWatch { - /** - * Type of task. - */ - export type Task = () => Promise; - - /** - * - * @param task - * @returns - */ - export const measure = async (task: Task): Promise<[T, number]> => { - const time: number = Date.now(); - const output: T = await task(); - return [output, Date.now() - time]; - }; - - /** - * - * @param title - * @param task - * @returns - */ - export const trace = - (title: string) => - async (task: Task): Promise<[T, number]> => { - process.stdout.write(` - ${title}: `); - const res: [T, number] = await measure(task); - - console.log(`${res[1].toLocaleString()} ms`); - return res; - }; -} diff --git a/packages/e2e/src/TestValidator.ts b/packages/e2e/src/TestValidator.ts index 45accc3fb..b3350d65c 100644 --- a/packages/e2e/src/TestValidator.ts +++ b/packages/e2e/src/TestValidator.ts @@ -1,5 +1,3 @@ -import { ranges } from "tstl"; - import { RandomGenerator } from "./RandomGenerator"; import { json_equal_to } from "./internal/json_equal_to"; @@ -304,7 +302,7 @@ export namespace TestValidator { const reversed: typeof comp = direction === "+" ? comp : (x, y) => comp(y, x); - if (ranges.is_sorted(data, (x, y) => reversed(x, y) < 0) === false) { + if (is_sorted(data, reversed) === false) { if ( fields.length === 1 && data.length && @@ -341,3 +339,9 @@ function is_promise(input: any): input is Promise { typeof (input as any).catch === "function" ); } + +function is_sorted(data: T[], comp: (x: T, y: T) => number): boolean { + for (let i: number = 1; i < data.length; ++i) + if (comp(data[i - 1], data[i]) > 0) return false; + return true; +} diff --git a/packages/e2e/src/module.ts b/packages/e2e/src/module.ts index ec2146d54..f1c8be538 100644 --- a/packages/e2e/src/module.ts +++ b/packages/e2e/src/module.ts @@ -1,7 +1,5 @@ export * from "./ArrayUtil"; -export * from "./DynamicBenchmarker"; export * from "./DynamicExecutor"; export * from "./GaffComparator"; export * from "./RandomGenerator"; -export * from "./StopWatch"; export * from "./TestValidator"; diff --git a/packages/e2e/src/test/index.ts b/packages/e2e/src/test/index.ts deleted file mode 100644 index 63bbc6a2a..000000000 --- a/packages/e2e/src/test/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { DynamicExecutor } from "../DynamicExecutor"; - -async function main(): Promise { - const report: DynamicExecutor.IReport = await DynamicExecutor.assert({ - prefix: "test", - parameters: () => [], - })(__dirname + "/features"); - console.log(`Elapsed time: ${report.time.toLocaleString()} ms`); -} -main().catch((exp) => { - console.log(exp); - process.exit(-1); -}); diff --git a/packages/e2e/src/test/features/internal/generate_random_articles.ts b/packages/e2e/test/features/internal/generate_random_articles.ts similarity index 91% rename from packages/e2e/src/test/features/internal/generate_random_articles.ts rename to packages/e2e/test/features/internal/generate_random_articles.ts index 3dcc4da72..5efb5f632 100644 --- a/packages/e2e/src/test/features/internal/generate_random_articles.ts +++ b/packages/e2e/test/features/internal/generate_random_articles.ts @@ -1,4 +1,5 @@ -import { RandomGenerator } from "../../../RandomGenerator"; +import { RandomGenerator } from "@nestia/e2e"; + import { IBbsArticle } from "../structures/IBbsArticle"; import { IPage } from "../structures/IPage"; diff --git a/packages/e2e/src/test/features/structures/IBbsArticle.ts b/packages/e2e/test/features/structures/IBbsArticle.ts similarity index 100% rename from packages/e2e/src/test/features/structures/IBbsArticle.ts rename to packages/e2e/test/features/structures/IBbsArticle.ts diff --git a/packages/e2e/src/test/features/structures/IPage.ts b/packages/e2e/test/features/structures/IPage.ts similarity index 100% rename from packages/e2e/src/test/features/structures/IPage.ts rename to packages/e2e/test/features/structures/IPage.ts diff --git a/packages/e2e/src/test/features/test_array_subsets.ts b/packages/e2e/test/features/test_array_subsets.ts similarity index 91% rename from packages/e2e/src/test/features/test_array_subsets.ts rename to packages/e2e/test/features/test_array_subsets.ts index 81022d3ee..8f4f8aebe 100644 --- a/packages/e2e/src/test/features/test_array_subsets.ts +++ b/packages/e2e/test/features/test_array_subsets.ts @@ -1,4 +1,4 @@ -import { ArrayUtil } from "../../ArrayUtil"; +import { ArrayUtil } from "@nestia/e2e"; export function test_array_subsets(): void { const array: number[] = new Array(6).fill(0).map((_, i) => i); diff --git a/packages/e2e/src/test/features/test_validate_equals.ts b/packages/e2e/test/features/test_validate_equals.ts similarity index 92% rename from packages/e2e/src/test/features/test_validate_equals.ts rename to packages/e2e/test/features/test_validate_equals.ts index 1ff9e51f7..f4da84feb 100644 --- a/packages/e2e/src/test/features/test_validate_equals.ts +++ b/packages/e2e/test/features/test_validate_equals.ts @@ -1,6 +1,6 @@ +import { TestValidator } from "@nestia/e2e"; import typia from "typia"; -import { TestValidator } from "../../TestValidator"; import { IBbsArticle } from "./structures/IBbsArticle"; import { IPage } from "./structures/IPage"; diff --git a/packages/e2e/src/test/features/test_validate_error.ts b/packages/e2e/test/features/test_validate_error.ts similarity index 91% rename from packages/e2e/src/test/features/test_validate_error.ts rename to packages/e2e/test/features/test_validate_error.ts index 9b2987378..4d82aae7c 100644 --- a/packages/e2e/src/test/features/test_validate_error.ts +++ b/packages/e2e/test/features/test_validate_error.ts @@ -1,4 +1,4 @@ -import { TestValidator } from "../../TestValidator"; +import { TestValidator } from "@nestia/e2e"; export async function test_validate_error(): Promise { // ASYNCHRONOUS diff --git a/packages/e2e/src/test/features/test_validate_http_error.ts b/packages/e2e/test/features/test_validate_http_error.ts similarity index 97% rename from packages/e2e/src/test/features/test_validate_http_error.ts rename to packages/e2e/test/features/test_validate_http_error.ts index 59519da4f..33f391820 100644 --- a/packages/e2e/src/test/features/test_validate_http_error.ts +++ b/packages/e2e/test/features/test_validate_http_error.ts @@ -1,4 +1,4 @@ -import { TestValidator } from "../../TestValidator"; +import { TestValidator } from "@nestia/e2e"; export async function test_validate_http_error(): Promise { // ASYNCHRONOUS diff --git a/packages/e2e/src/test/features/test_validate_index.ts b/packages/e2e/test/features/test_validate_index.ts similarity index 89% rename from packages/e2e/src/test/features/test_validate_index.ts rename to packages/e2e/test/features/test_validate_index.ts index bcd4bb82f..5fa629260 100644 --- a/packages/e2e/src/test/features/test_validate_index.ts +++ b/packages/e2e/test/features/test_validate_index.ts @@ -1,4 +1,5 @@ -import { TestValidator } from "../../TestValidator"; +import { TestValidator } from "@nestia/e2e"; + import { generate_random_articles } from "./internal/generate_random_articles"; export async function test_validate_index(): Promise { diff --git a/packages/e2e/src/test/features/test_validate_predicate.ts b/packages/e2e/test/features/test_validate_predicate.ts similarity index 90% rename from packages/e2e/src/test/features/test_validate_predicate.ts rename to packages/e2e/test/features/test_validate_predicate.ts index aacd64a7d..8cfc6da08 100644 --- a/packages/e2e/src/test/features/test_validate_predicate.ts +++ b/packages/e2e/test/features/test_validate_predicate.ts @@ -1,4 +1,4 @@ -import { TestValidator } from "../../TestValidator"; +import { TestValidator } from "@nestia/e2e"; export async function test_validate_predicate(): Promise { // SCALAR diff --git a/packages/e2e/src/test/features/test_validate_search.ts b/packages/e2e/test/features/test_validate_search.ts similarity index 96% rename from packages/e2e/src/test/features/test_validate_search.ts rename to packages/e2e/test/features/test_validate_search.ts index 9516aab4e..fd41de0a5 100644 --- a/packages/e2e/src/test/features/test_validate_search.ts +++ b/packages/e2e/test/features/test_validate_search.ts @@ -1,4 +1,5 @@ -import { TestValidator } from "../../TestValidator"; +import { TestValidator } from "@nestia/e2e"; + import { generate_random_articles } from "./internal/generate_random_articles"; import { IBbsArticle } from "./structures/IBbsArticle"; diff --git a/packages/e2e/src/test/features/test_validate_sort.ts b/packages/e2e/test/features/test_validate_sort.ts similarity index 95% rename from packages/e2e/src/test/features/test_validate_sort.ts rename to packages/e2e/test/features/test_validate_sort.ts index 90ab0d550..25087de81 100644 --- a/packages/e2e/src/test/features/test_validate_sort.ts +++ b/packages/e2e/test/features/test_validate_sort.ts @@ -1,5 +1,5 @@ -import { GaffComparator } from "../../GaffComparator"; -import { TestValidator } from "../../TestValidator"; +import { GaffComparator, TestValidator } from "@nestia/e2e"; + import { generate_random_articles } from "./internal/generate_random_articles"; import { IBbsArticle } from "./structures/IBbsArticle"; import { IPage } from "./structures/IPage"; diff --git a/packages/e2e/test/index.ts b/packages/e2e/test/index.ts new file mode 100644 index 000000000..9e776b293 --- /dev/null +++ b/packages/e2e/test/index.ts @@ -0,0 +1,20 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +async function main(): Promise { + const report: DynamicExecutor.IReport = await DynamicExecutor.assert({ + parameters: () => [], + location: __dirname + "/features", + prefix: "test", + onComplete: (exec) => { + const elapsed: number = + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); + console.log(`Elapsed time: ${report.time.toLocaleString()} ms`); +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/packages/e2e/test/tsconfig.json b/packages/e2e/test/tsconfig.json new file mode 100644 index 000000000..896caeb2f --- /dev/null +++ b/packages/e2e/test/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "../bin", + "paths": { + "@nestia/e2e": ["../src/index.ts"], + }, + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + ] + }, + "include": ["./", "../src"] +} \ No newline at end of file diff --git a/packages/e2e/tsconfig.json b/packages/e2e/tsconfig.json index 9cdcccdb7..aaf4bb2c9 100644 --- a/packages/e2e/tsconfig.json +++ b/packages/e2e/tsconfig.json @@ -81,10 +81,6 @@ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true, /* Skip type checking all .d.ts files. */ - "plugins": [ - { - "transform": "typia/lib/transform" - } - ] - } + }, + "include": ["./src"], } \ No newline at end of file diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 5ead6f22b..0b92fcba3 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/migrate", - "version": "0.14.2", + "version": "0.14.3", "description": "Migration program from swagger to NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,8 +36,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { + "@nestia/benchmark": "^0.1.0", "@nestia/core": "^3.5.0", - "@nestia/e2e": "^0.6.0", + "@nestia/e2e": "^0.7.0", "@nestia/fetcher": "^3.5.0", "@nestjs/common": "^10.3.8", "@nestjs/core": "^10.3.8", @@ -49,6 +50,7 @@ "@types/inquirer": "^9.0.7", "@types/node": "^20.3.3", "@types/swagger-ui-express": "^4.1.6", + "chalk": "4.1.2", "cli-progress": "^3.12.0", "dotenv": "^16.3.1", "dotenv-expand": "^10.0.0", @@ -63,13 +65,13 @@ "typescript-transform-paths": "^3.4.6" }, "dependencies": { - "@samchon/openapi": "^0.3.1", + "@samchon/openapi": "^0.3.2", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.4.2" + "typia": "^6.4.3" }, "files": [ "lib", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index b732bb92d..c28b6b317 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.5.0", - "@nestia/core": "^3.5.0", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.5.0.tgz", + "@nestia/core": "../core/nestia-core-3.5.0.tgz", "@samchon/openapi": "^0.3.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -56,7 +56,6 @@ "typia": ">=6.4.2 <7.0.0" }, "devDependencies": { - "@nestia/e2e": "^0.4.3", "@trivago/prettier-plugin-sort-imports": "^4.3.0", "@types/cli": "^0.11.21", "@types/express": "^4.17.15", diff --git a/test/features/all/src/test/index.ts b/test/features/all/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/all/src/test/index.ts +++ b/test/features/all/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/all/swagger.json b/test/features/all/swagger.json index 55161bf2d..d0abb0f2a 100644 --- a/test/features/all/swagger.json +++ b/test/features/all/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts b/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts +++ b/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json index 6ecbbd725..f63236beb 100644 --- a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json +++ b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix-versionUri/src/test/index.ts b/test/features/app-globalPrefix-versionUri/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/app-globalPrefix-versionUri/src/test/index.ts +++ b/test/features/app-globalPrefix-versionUri/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app-globalPrefix-versionUri/swagger.json b/test/features/app-globalPrefix-versionUri/swagger.json index 768db2ec1..a73cee794 100644 --- a/test/features/app-globalPrefix-versionUri/swagger.json +++ b/test/features/app-globalPrefix-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix/src/test/index.ts b/test/features/app-globalPrefix/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/app-globalPrefix/src/test/index.ts +++ b/test/features/app-globalPrefix/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app-globalPrefix/swagger.json b/test/features/app-globalPrefix/swagger.json index 3dab72fb4..159aa869b 100644 --- a/test/features/app-globalPrefix/swagger.json +++ b/test/features/app-globalPrefix/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-routerModule/src/test/index.ts b/test/features/app-routerModule/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/app-routerModule/src/test/index.ts +++ b/test/features/app-routerModule/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app-routerModule/swagger.json b/test/features/app-routerModule/swagger.json index 5ba36d72d..dbe6b80ee 100644 --- a/test/features/app-routerModule/swagger.json +++ b/test/features/app-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionHeader/src/test/index.ts b/test/features/app-versionHeader/src/test/index.ts index 833140e3b..f2915a8ba 100644 --- a/test/features/app-versionHeader/src/test/index.ts +++ b/test/features/app-versionHeader/src/test/index.ts @@ -21,7 +21,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app-versionHeader/swagger.json b/test/features/app-versionHeader/swagger.json index 6f5f88be4..fb68d2fa9 100644 --- a/test/features/app-versionHeader/swagger.json +++ b/test/features/app-versionHeader/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionUri/src/test/index.ts b/test/features/app-versionUri/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/app-versionUri/src/test/index.ts +++ b/test/features/app-versionUri/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app-versionUri/swagger.json b/test/features/app-versionUri/swagger.json index de4c1b753..e1c3c417f 100644 --- a/test/features/app-versionUri/swagger.json +++ b/test/features/app-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app/src/test/index.ts b/test/features/app/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/app/src/test/index.ts +++ b/test/features/app/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/app/swagger.json b/test/features/app/swagger.json index b4fc2c4d7..598115c44 100644 --- a/test/features/app/swagger.json +++ b/test/features/app/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify-4/src/test/index.ts b/test/features/beautify-4/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/beautify-4/src/test/index.ts +++ b/test/features/beautify-4/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/beautify-4/swagger.json b/test/features/beautify-4/swagger.json index 4a2951b33..7c320d578 100644 --- a/test/features/beautify-4/swagger.json +++ b/test/features/beautify-4/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/beautify-false/src/test/index.ts b/test/features/beautify-false/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/beautify-false/src/test/index.ts +++ b/test/features/beautify-false/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/beautify-false/swagger.json b/test/features/beautify-false/swagger.json index 4c9d42a53..87ac2db79 100644 --- a/test/features/beautify-false/swagger.json +++ b/test/features/beautify-false/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify/src/test/index.ts b/test/features/beautify/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/beautify/src/test/index.ts +++ b/test/features/beautify/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/beautify/swagger.json b/test/features/beautify/swagger.json index 11439af9f..3bc065f7a 100644 --- a/test/features/beautify/swagger.json +++ b/test/features/beautify/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/body-config-assert/src/test/index.ts b/test/features/body-config-assert/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-assert/src/test/index.ts +++ b/test/features/body-config-assert/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-assert/swagger.json b/test/features/body-config-assert/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-assert/swagger.json +++ b/test/features/body-config-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertClone/src/test/index.ts b/test/features/body-config-assertClone/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-assertClone/src/test/index.ts +++ b/test/features/body-config-assertClone/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-assertClone/swagger.json b/test/features/body-config-assertClone/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-assertClone/swagger.json +++ b/test/features/body-config-assertClone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertEquals/src/test/index.ts b/test/features/body-config-assertEquals/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-assertEquals/src/test/index.ts +++ b/test/features/body-config-assertEquals/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-assertEquals/swagger.json b/test/features/body-config-assertEquals/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-assertEquals/swagger.json +++ b/test/features/body-config-assertEquals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertPrune/src/test/index.ts b/test/features/body-config-assertPrune/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-assertPrune/src/test/index.ts +++ b/test/features/body-config-assertPrune/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-assertPrune/swagger.json b/test/features/body-config-assertPrune/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-assertPrune/swagger.json +++ b/test/features/body-config-assertPrune/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-equals/src/test/index.ts b/test/features/body-config-equals/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-equals/src/test/index.ts +++ b/test/features/body-config-equals/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-equals/swagger.json b/test/features/body-config-equals/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-equals/swagger.json +++ b/test/features/body-config-equals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-is/src/test/index.ts b/test/features/body-config-is/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-is/src/test/index.ts +++ b/test/features/body-config-is/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-is/swagger.json b/test/features/body-config-is/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-is/swagger.json +++ b/test/features/body-config-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validate/src/test/index.ts b/test/features/body-config-validate/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-validate/src/test/index.ts +++ b/test/features/body-config-validate/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-validate/swagger.json b/test/features/body-config-validate/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-validate/swagger.json +++ b/test/features/body-config-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validateClone/src/test/index.ts b/test/features/body-config-validateClone/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-validateClone/src/test/index.ts +++ b/test/features/body-config-validateClone/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-validateClone/swagger.json b/test/features/body-config-validateClone/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-validateClone/swagger.json +++ b/test/features/body-config-validateClone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validateEquals/src/test/index.ts b/test/features/body-config-validateEquals/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-validateEquals/src/test/index.ts +++ b/test/features/body-config-validateEquals/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-validateEquals/swagger.json b/test/features/body-config-validateEquals/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-validateEquals/swagger.json +++ b/test/features/body-config-validateEquals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validatePrune/src/test/index.ts b/test/features/body-config-validatePrune/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-config-validatePrune/src/test/index.ts +++ b/test/features/body-config-validatePrune/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-config-validatePrune/swagger.json b/test/features/body-config-validatePrune/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-config-validatePrune/swagger.json +++ b/test/features/body-config-validatePrune/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-generic-default/src/test/index.ts b/test/features/body-generic-default/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/body-generic-default/src/test/index.ts +++ b/test/features/body-generic-default/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/body-generic-default/swagger.json b/test/features/body-generic-default/swagger.json index 72b38998e..2c5ed4d8f 100644 --- a/test/features/body-generic-default/swagger.json +++ b/test/features/body-generic-default/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/google/{accountCode}/drives/images/upload/single":{"post":{"tags":["Google"],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"구글 계정명","required":true}],"requestBody":{"description":"단일 이미지 파일 업로드 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveImageSingleUpload"}}},"required":true},"responses":{"201":{"description":"업로드 완료된 구글 드라이브 파일 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveFile"}}}}},"summary":"단일 이미지 파일 업로드","description":"단일 이미지 파일 업로드.\n\n단 하나의 이미지 파일을 구글 드라이브에 개별 업로드한다."}},"/google/{accountCode}/drives/images/upload/activate":{"post":{"tags":[],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleTokenActivategoogle-authnever"}}},"required":true},"responses":{"201":{"description":""}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStorestring"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticlestring"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStorestring"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IGoogleDriveImageSingleUpload":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth-key","title":"구글 사용자 인증 키","description":"구글 사용자 인증 키.\n\n구글 드라이브에 이미지 파일을 업로드하기 위하여, 구글 사용자 인증이 선행되어야 한다.\n본 필드값에는, 바로 그 사전 인증하여 발급받은 사용자 인증 키를 할당해주어야 함.\n그리고 그 인증 키는, read 및 write scope 에 대하여 대응 가능하여야 한다."},"url":{"oneOf":[{"type":"string","format":"uri","contentMediaType":"image/png"},{"type":"string","format":"uri","contentMediaType":"image/jpg"}],"title":"이미지 파일 경로","description":"이미지 파일 경로.\n\nWorkflow Editor 상 Inspector 내지 Chat Agent 의 File Uploader 의하여 구성됨."},"location":{"type":"string","title":"파일 경로","description":"이미지 파일이 위치할 경로, 파일명 및 확장자는 제외."},"name":{"type":"string","x-wrtn-placeholder":"파일명을 입력해주세요.","title":"파일명","description":"파일명.\n\n확장자가 제외된, 순수 파일명.\n\n{@link url} 의 실제 파일명과 다르게 업로드 가능."},"extension":{"oneOf":[{"const":"jpg"},{"const":"png"}],"title":"이미지 확장자","description":"이미지 확장자."}},"required":["token","url","location","name","extension"],"description":"구글 드라이브에의 이미지 업로드 DTO.\n\n구글 드라이브에 단일 이미지를 업로드할 때 사용하는 DTO. 만일 복수의 이미지를\n동시에 업로드하고 싶다면, `IGoogleDriveImageMultipleUpload` DTO 및 관련\nAPI 함수를 사용하도록 할 것."},"IGoogleDriveFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"location":{"type":"string"},"name":{"type":"string"},"extension":{"oneOf":[{"type":"null"},{"type":"string"}]},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","location","name","extension","url","created_at","updated_at"]},"IGoogleTokenActivategoogle-authnever":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth"}},"required":["token"]},"IBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","format","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticlestring":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","format","files"]},"PartialIBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Google"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/google/{accountCode}/drives/images/upload/single":{"post":{"tags":["Google"],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"구글 계정명","required":true}],"requestBody":{"description":"단일 이미지 파일 업로드 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveImageSingleUpload"}}},"required":true},"responses":{"201":{"description":"업로드 완료된 구글 드라이브 파일 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveFile"}}}}},"summary":"단일 이미지 파일 업로드","description":"단일 이미지 파일 업로드.\n\n단 하나의 이미지 파일을 구글 드라이브에 개별 업로드한다."}},"/google/{accountCode}/drives/images/upload/activate":{"post":{"tags":[],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleTokenActivategoogle-authnever"}}},"required":true},"responses":{"201":{"description":""}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStorestring"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticlestring"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStorestring"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IGoogleDriveImageSingleUpload":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth-key","title":"구글 사용자 인증 키","description":"구글 사용자 인증 키.\n\n구글 드라이브에 이미지 파일을 업로드하기 위하여, 구글 사용자 인증이 선행되어야 한다.\n본 필드값에는, 바로 그 사전 인증하여 발급받은 사용자 인증 키를 할당해주어야 함.\n그리고 그 인증 키는, read 및 write scope 에 대하여 대응 가능하여야 한다."},"url":{"oneOf":[{"type":"string","format":"uri","contentMediaType":"image/png"},{"type":"string","format":"uri","contentMediaType":"image/jpg"}],"title":"이미지 파일 경로","description":"이미지 파일 경로.\n\nWorkflow Editor 상 Inspector 내지 Chat Agent 의 File Uploader 의하여 구성됨."},"location":{"type":"string","title":"파일 경로","description":"이미지 파일이 위치할 경로, 파일명 및 확장자는 제외."},"name":{"type":"string","x-wrtn-placeholder":"파일명을 입력해주세요.","title":"파일명","description":"파일명.\n\n확장자가 제외된, 순수 파일명.\n\n{@link url} 의 실제 파일명과 다르게 업로드 가능."},"extension":{"oneOf":[{"const":"jpg"},{"const":"png"}],"title":"이미지 확장자","description":"이미지 확장자."}},"required":["token","url","location","name","extension"],"description":"구글 드라이브에의 이미지 업로드 DTO.\n\n구글 드라이브에 단일 이미지를 업로드할 때 사용하는 DTO. 만일 복수의 이미지를\n동시에 업로드하고 싶다면, `IGoogleDriveImageMultipleUpload` DTO 및 관련\nAPI 함수를 사용하도록 할 것."},"IGoogleDriveFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"location":{"type":"string"},"name":{"type":"string"},"extension":{"oneOf":[{"type":"null"},{"type":"string"}]},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","location","name","extension","url","created_at","updated_at"]},"IGoogleTokenActivategoogle-authnever":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth"}},"required":["token"]},"IBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","format","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticlestring":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","format","files"]},"PartialIBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Google"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-assert/src/test/index.ts b/test/features/body-manual-assert/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-manual-assert/src/test/index.ts +++ b/test/features/body-manual-assert/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-manual-assert/swagger.json b/test/features/body-manual-assert/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-manual-assert/swagger.json +++ b/test/features/body-manual-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-is/src/test/index.ts b/test/features/body-manual-is/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-manual-is/src/test/index.ts +++ b/test/features/body-manual-is/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-manual-is/swagger.json b/test/features/body-manual-is/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-manual-is/swagger.json +++ b/test/features/body-manual-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-validate/src/test/index.ts b/test/features/body-manual-validate/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/body-manual-validate/src/test/index.ts +++ b/test/features/body-manual-validate/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/body-manual-validate/swagger.json b/test/features/body-manual-validate/swagger.json index 4232ec1b4..0977dcc1f 100644 --- a/test/features/body-manual-validate/swagger.json +++ b/test/features/body-manual-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body/src/test/index.ts b/test/features/body/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/body/src/test/index.ts +++ b/test/features/body/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/body/swagger.json b/test/features/body/swagger.json index 31fd02b4b..87ac2db79 100644 --- a/test/features/body/swagger.json +++ b/test/features/body/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-config-project/src/test/index.ts b/test/features/cli-config-project/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/cli-config-project/src/test/index.ts +++ b/test/features/cli-config-project/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/cli-config-project/swagger.json b/test/features/cli-config-project/swagger.json index 06a06d284..a0b775049 100644 --- a/test/features/cli-config-project/swagger.json +++ b/test/features/cli-config-project/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-config/src/test/index.ts b/test/features/cli-config/src/test/index.ts index 6fe34bf79..0a03f783a 100644 --- a/test/features/cli-config/src/test/index.ts +++ b/test/features/cli-config/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); console.log(__dirname, __dirname.substring(__dirname.length - 2)); diff --git a/test/features/cli-config/swagger.json b/test/features/cli-config/swagger.json index 06a06d284..a0b775049 100644 --- a/test/features/cli-config/swagger.json +++ b/test/features/cli-config/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-project/swagger.json b/test/features/cli-project/swagger.json index cf49adac8..d17e31365 100644 --- a/test/features/cli-project/swagger.json +++ b/test/features/cli-project/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/clone-and-exact-optional-property/src/test/index.ts b/test/features/clone-and-exact-optional-property/src/test/index.ts index 98fe96b4d..526390c8f 100644 --- a/test/features/clone-and-exact-optional-property/src/test/index.ts +++ b/test/features/clone-and-exact-optional-property/src/test/index.ts @@ -20,7 +20,14 @@ async function main(): Promise { host: "http://127.0.0.1:37000", }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/clone-and-exact-optional-property/swagger.json b/test/features/clone-and-exact-optional-property/swagger.json index d8d9a14cb..78167a593 100644 --- a/test/features/clone-and-exact-optional-property/swagger.json +++ b/test/features/clone-and-exact-optional-property/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/partial-dto-test/original":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal"}}}}}}},"/partial-dto-test/partial-interface":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal.IPartialInterface"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPartialInterface"}}}}}}},"/partial-dto-test/partial-type":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"}}}}}}}},"components":{"schemas":{"IOriginal":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"c":{"type":"string"},"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"required":["a","b","c","d","email","created_at"]},"IOriginal.IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"c":{"type":"string"}}},"IPartialInterface":{"type":"object","properties":{"a":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}}},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"d":{"type":"string"}},"description":"Make all properties in T optional"},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"b":{"type":"string"}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/partial-dto-test/original":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal"}}}}}}},"/partial-dto-test/partial-interface":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal.IPartialInterface"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPartialInterface"}}}}}}},"/partial-dto-test/partial-type":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"}}}}}}}},"components":{"schemas":{"IOriginal":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"c":{"type":"string"},"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"required":["a","b","c","d","email","created_at"]},"IOriginal.IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"c":{"type":"string"}}},"IPartialInterface":{"type":"object","properties":{"a":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}}},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"d":{"type":"string"}},"description":"Make all properties in T optional"},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"b":{"type":"string"}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/clone-and-propagate/src/test/index.ts b/test/features/clone-and-propagate/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/clone-and-propagate/src/test/index.ts +++ b/test/features/clone-and-propagate/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/clone-and-propagate/swagger.json b/test/features/clone-and-propagate/swagger.json index ea9dde47a..30c47f350 100644 --- a/test/features/clone-and-propagate/swagger.json +++ b/test/features/clone-and-propagate/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { @@ -356,13 +356,34 @@ "required": true }, { - "name": "query", + "name": "page", "in": "query", "schema": { - "$ref": "#/components/schemas/IPage.IRequest" + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer" + } + ] }, - "description": "Pagination query", - "required": true + "required": false + }, + { + "name": "limit", + "in": "query", + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "integer" + } + ] + }, + "required": false } ], "responses": { @@ -1533,12 +1554,29 @@ "required": true }, { - "name": "query", + "name": "user_id", "in": "query", "schema": { - "$ref": "#/components/schemas/IAuthentication" + "type": "string" + }, + "required": true + }, + { + "name": "oauth_type", + "in": "query", + "schema": { + "oneOf": [ + { + "const": "google" + }, + { + "const": "github" + }, + { + "const": "kakao" + } + ] }, - "description": "", "required": true } ], @@ -1582,13 +1620,22 @@ "required": true }, { - "name": "query", + "name": "user_type", "in": "query", "schema": { - "$ref": "#/components/schemas/IUser.ISearch" + "oneOf": [ + { + "const": "admin" + }, + { + "const": "default" + }, + { + "const": "seller" + } + ] }, - "description": "", - "required": true + "required": false } ], "responses": { diff --git a/test/features/clone-implicit/src/test/index.ts b/test/features/clone-implicit/src/test/index.ts index 98fe96b4d..526390c8f 100644 --- a/test/features/clone-implicit/src/test/index.ts +++ b/test/features/clone-implicit/src/test/index.ts @@ -20,7 +20,14 @@ async function main(): Promise { host: "http://127.0.0.1:37000", }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/clone-implicit/swagger.json b/test/features/clone-implicit/swagger.json index b850f29fc..901f3c30c 100644 --- a/test/features/clone-implicit/swagger.json +++ b/test/features/clone-implicit/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/clone-native/src/test/index.ts b/test/features/clone-native/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/clone-native/src/test/index.ts +++ b/test/features/clone-native/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/clone-native/swagger.json b/test/features/clone-native/swagger.json index ced8fd1f2..09423ba19 100644 --- a/test/features/clone-native/swagger.json +++ b/test/features/clone-native/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/config-pattern/src/test/index.ts b/test/features/config-pattern/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/config-pattern/src/test/index.ts +++ b/test/features/config-pattern/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/config-pattern/swagger.json b/test/features/config-pattern/swagger.json index cf49adac8..d17e31365 100644 --- a/test/features/config-pattern/swagger.json +++ b/test/features/config-pattern/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/date/src/test/index.ts b/test/features/date/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/date/src/test/index.ts +++ b/test/features/date/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/date/swagger.json b/test/features/date/swagger.json index 73b6ab1ff..11843fe6b 100644 --- a/test/features/date/swagger.json +++ b/test/features/date/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/date":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDateDefined"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IDateDefined":{"type":"object","properties":{"string":{"type":"string","format":"date-time"},"date":{"type":"string","format":"date-time"},"date_with_tag":{"type":"string","format":"date-time"},"date_but_union":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"type":{"const":"Buffer"},"data":{"type":"array","items":{"type":"number"}}},"required":["type","data"]}]}},"required":["string","date","date_with_tag","date_but_union"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/date":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDateDefined"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IDateDefined":{"type":"object","properties":{"string":{"type":"string","format":"date-time"},"date":{"type":"string","format":"date-time"},"date_with_tag":{"type":"string","format":"date-time"},"date_but_union":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"type":{"const":"Buffer"},"data":{"type":"array","items":{"type":"number"}}},"required":["type","data"]}]}},"required":["string","date","date_with_tag","date_but_union"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 091968344..d0892f959 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^5.0.7", + "rimraf": "^6.0.0", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.4.2-dev.20240705", + "@nestia/fetcher": "^3.5.0", "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute-assert-json/swagger.json b/test/features/distribute-assert-json/swagger.json index 45ecde152..a4a693486 100644 --- a/test/features/distribute-assert-json/swagger.json +++ b/test/features/distribute-assert-json/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ut](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nUpdated content","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}},"x-nestia-encrypted":true}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ut](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nUpdated content","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}},"x-nestia-encrypted":true}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 091968344..d0892f959 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^5.0.7", + "rimraf": "^6.0.0", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.4.2-dev.20240705", + "@nestia/fetcher": "^3.5.0", "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute-assert/swagger.json b/test/features/distribute-assert/swagger.json index f73e1496c..890fd2764 100644 --- a/test/features/distribute-assert/swagger.json +++ b/test/features/distribute-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 091968344..d0892f959 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^5.0.7", + "rimraf": "^6.0.0", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.4.2-dev.20240705", + "@nestia/fetcher": "^3.5.0", "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute-json/swagger.json b/test/features/distribute-json/swagger.json index f73e1496c..890fd2764 100644 --- a/test/features/distribute-json/swagger.json +++ b/test/features/distribute-json/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 091968344..d0892f959 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^5.0.7", + "rimraf": "^6.0.0", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.4.2-dev.20240705", + "@nestia/fetcher": "^3.5.0", "typia": "^6.4.2" } } \ No newline at end of file diff --git a/test/features/distribute/swagger.json b/test/features/distribute/swagger.json index f73e1496c..890fd2764 100644 --- a/test/features/distribute/swagger.json +++ b/test/features/distribute/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/duplicated/src/test/index.ts b/test/features/duplicated/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/duplicated/src/test/index.ts +++ b/test/features/duplicated/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/duplicated/swagger.json b/test/features/duplicated/swagger.json index 625af9154..24cb593d5 100644 --- a/test/features/duplicated/swagger.json +++ b/test/features/duplicated/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/duplicated/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/multiple/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/duplicated/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/multiple/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/e2e/src/test/index.ts b/test/features/e2e/src/test/index.ts index 98fe96b4d..526390c8f 100644 --- a/test/features/e2e/src/test/index.ts +++ b/test/features/e2e/src/test/index.ts @@ -20,7 +20,14 @@ async function main(): Promise { host: "http://127.0.0.1:37000", }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/e2e/swagger.json b/test/features/e2e/swagger.json index f73e1496c..890fd2764 100644 --- a/test/features/e2e/swagger.json +++ b/test/features/e2e/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/encrypted/src/test/index.ts b/test/features/encrypted/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/encrypted/src/test/index.ts +++ b/test/features/encrypted/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/encrypted/swagger.json b/test/features/encrypted/swagger.json index a4c7e5c7e..6d096590a 100644 --- a/test/features/encrypted/swagger.json +++ b/test/features/encrypted/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/exception-filter/src/test/index.ts b/test/features/exception-filter/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/exception-filter/src/test/index.ts +++ b/test/features/exception-filter/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/exception-filter/swagger.json b/test/features/exception-filter/swagger.json index d8608851b..095ac4d17 100644 --- a/test/features/exception-filter/swagger.json +++ b/test/features/exception-filter/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/exception/typedBody":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/exception/typedManual":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/exception/{id}/typedParam":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":""}}}},"/exception/typedQuery":{"get":{"tags":[],"parameters":[{"name":"file","in":"query","schema":{"$ref":"#/components/schemas/IAttachmentFile"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAttachmentFile"}}}}}}},"/exception/internal":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/exception/typedBody":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/exception/typedManual":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/exception/{id}/typedParam":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":""}}}},"/exception/typedQuery":{"get":{"tags":[],"parameters":[{"name":"name","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"required":true},{"name":"extension","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"required":true},{"name":"url","in":"query","schema":{"type":"string","format":"uri"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAttachmentFile"}}}}}}},"/exception/internal":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/exception-with-propagate/src/test/index.ts b/test/features/exception-with-propagate/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/exception-with-propagate/src/test/index.ts +++ b/test/features/exception-with-propagate/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/exception-with-propagate/swagger.json b/test/features/exception-with-propagate/swagger.json index 2360797ae..7ff19b0a0 100644 --- a/test/features/exception-with-propagate/swagger.json +++ b/test/features/exception-with-propagate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/success":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"const":"INVALID_PERMISSION"}}}}}}},"/success/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}},"/fail/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]}}}}}}},"/fail/composite/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/success":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"const":"INVALID_PERMISSION"}}}}}}},"/success/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}},"/fail/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]}}}}}}},"/fail/composite/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/exception/src/test/index.ts b/test/features/exception/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/exception/src/test/index.ts +++ b/test/features/exception/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/exception/swagger.json b/test/features/exception/swagger.json index 8de24c500..2ab65ced4 100644 --- a/test/features/exception/swagger.json +++ b/test/features/exception/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.4.2-dev.20240705", + "version": "3.5.0", "title": "@nestia/test", "description": "Test program of Nestia", "license": { diff --git a/test/features/fastify/src/test/index.ts b/test/features/fastify/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/fastify/src/test/index.ts +++ b/test/features/fastify/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/fastify/swagger.json b/test/features/fastify/swagger.json index 951d663d9..369cc62c8 100644 --- a/test/features/fastify/swagger.json +++ b/test/features/fastify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/headers-decompose/src/test/index.ts b/test/features/headers-decompose/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/headers-decompose/src/test/index.ts +++ b/test/features/headers-decompose/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/headers-decompose/swagger.json b/test/features/headers-decompose/swagger.json index 917d2cf79..7e906f006 100644 --- a/test/features/headers-decompose/swagger.json +++ b/test/features/headers-decompose/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-name":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-flags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-flags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-name":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-flags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-flags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/headers/src/test/index.ts b/test/features/headers/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/headers/src/test/index.ts +++ b/test/features/headers/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/headers/swagger.json b/test/features/headers/swagger.json index 3790653a4..42a193c8d 100644 --- a/test/features/headers/swagger.json +++ b/test/features/headers/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"headers","in":"header","schema":{"$ref":"#/components/schemas/IHeaders"},"description":"","required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"headers","in":"header","schema":{"$ref":"#/components/schemas/IHeaders"},"description":"Headers for authentication","required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Store article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article id","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"Name in header for authentication","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-nAme":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-fLags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-fLags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-nAme","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-fLags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-nAme","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-fLags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Store article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article id","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"Name in header for authentication","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-nAme":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-fLags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-fLags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/ignore/src/test/index.ts b/test/features/ignore/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/ignore/src/test/index.ts +++ b/test/features/ignore/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/ignore/swagger.json b/test/features/ignore/swagger.json index 4a1c803a3..d6fd35108 100644 --- a/test/features/ignore/swagger.json +++ b/test/features/ignore/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"post":{"deprecated":true,"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"post":{"deprecated":true,"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/implicit-error/src/test/index.ts b/test/features/implicit-error/src/test/index.ts index 98fe96b4d..526390c8f 100644 --- a/test/features/implicit-error/src/test/index.ts +++ b/test/features/implicit-error/src/test/index.ts @@ -20,7 +20,14 @@ async function main(): Promise { host: "http://127.0.0.1:37000", }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/kebab/src/test/index.ts b/test/features/kebab/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/kebab/src/test/index.ts +++ b/test/features/kebab/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/kebab/swagger.json b/test/features/kebab/swagger.json index 0024ec890..958a041d7 100644 --- a/test/features/kebab/swagger.json +++ b/test/features/kebab/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/ke-bab-with-dashes":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/ke-bab-with-dashes":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/method/src/test/index.ts b/test/features/method/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/method/src/test/index.ts +++ b/test/features/method/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/method/swagger.json b/test/features/method/swagger.json index c4ead8149..5a4a477c7 100644 --- a/test/features/method/swagger.json +++ b/test/features/method/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/method/head":{"head":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/method/head":{"head":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/migrate/migrate.json b/test/features/migrate/migrate.json index 58ab72bae..c7e47c5b5 100644 --- a/test/features/migrate/migrate.json +++ b/test/features/migrate/migrate.json @@ -45,7 +45,7 @@ "name": "query", "key": "query", "schema": { - "$ref": "#/components/schemas/IPage.IRequest" + "$ref": "#/components/schemas/IApiBbsArticles.PatchQuery" } }, "body": null, @@ -169,7 +169,7 @@ "name": "query", "key": "query", "schema": { - "$ref": "#/components/schemas/IQuery" + "$ref": "#/components/schemas/IApiQueryTyped.GetQuery" } }, "body": null, @@ -198,7 +198,7 @@ "name": "query", "key": "query", "schema": { - "$ref": "#/components/schemas/INestQuery" + "$ref": "#/components/schemas/IApiQueryNest.GetQuery" } }, "body": null, diff --git a/test/features/migrate/src/test/index.ts b/test/features/migrate/src/test/index.ts index 2ee1f6c7f..adba77c0c 100644 --- a/test/features/migrate/src/test/index.ts +++ b/test/features/migrate/src/test/index.ts @@ -41,7 +41,14 @@ async function main(): Promise { }, } satisfies ITestProps, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/migrate/swagger.json b/test/features/migrate/swagger.json index b6895246d..ce1fc9986 100644 --- a/test/features/migrate/swagger.json +++ b/test/features/migrate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/multipart-form-data-fastify/src/test/index.ts b/test/features/multipart-form-data-fastify/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/multipart-form-data-fastify/src/test/index.ts +++ b/test/features/multipart-form-data-fastify/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/multipart-form-data-fastify/swagger.json b/test/features/multipart-form-data-fastify/swagger.json index 05ef9faf6..ecf75f648 100644 --- a/test/features/multipart-form-data-fastify/swagger.json +++ b/test/features/multipart-form-data-fastify/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.4.2-dev.20240705", - "title": "@nestia/test", + "version": "3.5.0", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git a/test/features/multipart-form-data/src/test/index.ts b/test/features/multipart-form-data/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/multipart-form-data/src/test/index.ts +++ b/test/features/multipart-form-data/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/multipart-form-data/swagger.json b/test/features/multipart-form-data/swagger.json index 05ef9faf6..ecf75f648 100644 --- a/test/features/multipart-form-data/swagger.json +++ b/test/features/multipart-form-data/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.4.2-dev.20240705", - "title": "@nestia/test", + "version": "3.5.0", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git a/test/features/non-equals/src/test/index.ts b/test/features/non-equals/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/non-equals/src/test/index.ts +++ b/test/features/non-equals/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/non-equals/swagger.json b/test/features/non-equals/swagger.json index f5b4d36d6..d6423ae0c 100644 --- a/test/features/non-equals/swagger.json +++ b/test/features/non-equals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/request":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IRequestDto":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}},"required":["a","b"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/request":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IRequestDto":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}},"required":["a","b"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/operationId/src/test/index.ts b/test/features/operationId/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/operationId/src/test/index.ts +++ b/test/features/operationId/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/operationId/swagger.json b/test/features/operationId/swagger.json index a599e501a..9c2328012 100644 --- a/test/features/operationId/swagger.json +++ b/test/features/operationId/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"operationId":"HealthController.get","parameters":[],"responses":{"200":{"description":""}}}},"/operationId/custom":{"get":{"tags":[],"operationId":"some-custom-operation-id","parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"operationId":"PerformanceController.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"operationId":"HealthController.get","parameters":[],"responses":{"200":{"description":""}}}},"/operationId/custom":{"get":{"tags":[],"operationId":"some-custom-operation-id","parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"operationId":"PerformanceController.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/param/src/test/index.ts b/test/features/param/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/param/src/test/index.ts +++ b/test/features/param/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/param/swagger.json b/test/features/param/swagger.json index 5f317493b..9d1313491 100644 --- a/test/features/param/swagger.json +++ b/test/features/param/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}},"/param/{value}/uuid":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/date":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"date"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/uuid_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/date_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"date"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}},"/param/{value}/uuid":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/date":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"date"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/uuid_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/date_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"date"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/plain/src/test/index.ts b/test/features/plain/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/plain/src/test/index.ts +++ b/test/features/plain/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/plain/swagger.json b/test/features/plain/swagger.json index 3e65a8f37..cf42f37ab 100644 --- a/test/features/plain/swagger.json +++ b/test/features/plain/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain/string":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/template":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string","pattern":"^((something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_false_it\\?)|(something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_true_it\\?))$"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/constant":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain/string":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/template":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string","pattern":"^((something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_false_it\\?)|(something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_true_it\\?))$"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/constant":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/propagate/src/test/index.ts b/test/features/propagate/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/propagate/src/test/index.ts +++ b/test/features/propagate/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/propagate/swagger.json b/test/features/propagate/swagger.json index 5d8e34305..20fdc9f4b 100644 --- a/test/features/propagate/swagger.json +++ b/test/features/propagate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.4.2-dev.20240705","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/members/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember"}}},"x-nestia-encrypted":true},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/INotFound"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden.IExpired"}}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IMember.ILogin":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},"IForbidden":{"type":"object","properties":{"status":{"const":403},"message":{"type":"string"}},"required":["status","message"]},"INotFound":{"type":"object","properties":{"status":{"const":404},"message":{"type":"string"}},"required":["status","message"]},"IForbidden.IExpired":{"type":"object","properties":{"status":{"const":422},"message":{"type":"string"}},"required":["status","message"]},"IMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"nickname":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","nickname","created_at"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/members/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember"}}},"x-nestia-encrypted":true},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/INotFound"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden.IExpired"}}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IMember.ILogin":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},"IForbidden":{"type":"object","properties":{"status":{"const":403},"message":{"type":"string"}},"required":["status","message"]},"INotFound":{"type":"object","properties":{"status":{"const":404},"message":{"type":"string"}},"required":["status","message"]},"IForbidden.IExpired":{"type":"object","properties":{"status":{"const":422},"message":{"type":"string"}},"required":["status","message"]},"IMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"nickname":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","nickname","created_at"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-decompose-false/src/test/index.ts b/test/features/query-decompose-false/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/query-decompose-false/src/test/index.ts +++ b/test/features/query-decompose-false/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/query-decompose-false/swagger.json b/test/features/query-decompose-false/swagger.json index 5bd123c1c..4581667ab 100644 --- a/test/features/query-decompose-false/swagger.json +++ b/test/features/query-decompose-false/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240706","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-decompose-true/src/test/index.ts b/test/features/query-decompose-true/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/query-decompose-true/src/test/index.ts +++ b/test/features/query-decompose-true/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/query-decompose-true/swagger.json b/test/features/query-decompose-true/swagger.json index f74265470..ba18172a0 100644 --- a/test/features/query-decompose-true/swagger.json +++ b/test/features/query-decompose-true/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240706","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-decompose/swagger.json b/test/features/query-decompose/swagger.json deleted file mode 100644 index 6f7d2ad78..000000000 --- a/test/features/query-decompose/swagger.json +++ /dev/null @@ -1 +0,0 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240707","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query/src/test/index.ts b/test/features/query/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/query/src/test/index.ts +++ b/test/features/query/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/query/swagger.json b/test/features/query/swagger.json index 65cd77e56..e4c604998 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0-dev.20240707","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IOptionalQuery"},"description":"","required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"a","in":"query","schema":{"type":"string"},"required":false},{"name":"b","in":"query","schema":{"type":"number"},"required":false},{"name":"c","in":"query","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-invalid-path-error/src/test/index.ts b/test/features/route-invalid-path-error/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/route-invalid-path-error/src/test/index.ts +++ b/test/features/route-invalid-path-error/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/route-manual-assert/src/test/index.ts b/test/features/route-manual-assert/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/route-manual-assert/src/test/index.ts +++ b/test/features/route-manual-assert/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/route-manual-assert/swagger.json b/test/features/route-manual-assert/swagger.json index 64e10b886..fc10e7bd3 100644 --- a/test/features/route-manual-assert/swagger.json +++ b/test/features/route-manual-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-is/src/test/index.ts b/test/features/route-manual-is/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/route-manual-is/src/test/index.ts +++ b/test/features/route-manual-is/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/route-manual-is/swagger.json b/test/features/route-manual-is/swagger.json index 64e10b886..fc10e7bd3 100644 --- a/test/features/route-manual-is/swagger.json +++ b/test/features/route-manual-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-stringify/src/test/index.ts b/test/features/route-manual-stringify/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/route-manual-stringify/src/test/index.ts +++ b/test/features/route-manual-stringify/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/route-manual-stringify/swagger.json b/test/features/route-manual-stringify/swagger.json index 64e10b886..fc10e7bd3 100644 --- a/test/features/route-manual-stringify/swagger.json +++ b/test/features/route-manual-stringify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-validate/src/test/index.ts b/test/features/route-manual-validate/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/route-manual-validate/src/test/index.ts +++ b/test/features/route-manual-validate/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/route-manual-validate/swagger.json b/test/features/route-manual-validate/swagger.json index 64e10b886..fc10e7bd3 100644 --- a/test/features/route-manual-validate/swagger.json +++ b/test/features/route-manual-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route/src/test/index.ts b/test/features/route/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/route/src/test/index.ts +++ b/test/features/route/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/route/swagger.json b/test/features/route/swagger.json index 64e10b886..fc10e7bd3 100644 --- a/test/features/route/swagger.json +++ b/test/features/route/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/security-error-not-found/src/test/index.ts b/test/features/security-error-not-found/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/security-error-not-found/src/test/index.ts +++ b/test/features/security-error-not-found/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/security-error-not-oauth2/src/test/index.ts b/test/features/security-error-not-oauth2/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/security-error-not-oauth2/src/test/index.ts +++ b/test/features/security-error-not-oauth2/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/security-error-out-of-scopes/src/test/index.ts b/test/features/security-error-out-of-scopes/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/security-error-out-of-scopes/src/test/index.ts +++ b/test/features/security-error-out-of-scopes/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/security/src/test/index.ts b/test/features/security/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/security/src/test/index.ts +++ b/test/features/security/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/security/swagger.json b/test/features/security/swagger.json index d5befc514..9e4d6289c 100644 --- a/test/features/security/swagger.json +++ b/test/features/security/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/basic":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/basic_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/bearer":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/bearer_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/oauth2":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/oauth2_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/optional_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{},{"bearer":[]}]}},"/security":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}}}}},"components":{"schemas":{"IToken":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"securitySchemes":{"basic":{"type":"http","scheme":"basic"},"bearer":{"type":"http","scheme":"bearer"},"oauth2":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"security":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"x1":"x1","x2":"x2"}}}}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/basic":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/basic_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/bearer":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/bearer_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/oauth2":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/oauth2_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/optional_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{},{"bearer":[]}]}},"/security":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}}}}},"components":{"schemas":{"IToken":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"securitySchemes":{"basic":{"type":"http","scheme":"basic"},"bearer":{"type":"http","scheme":"bearer"},"oauth2":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"security":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"x1":"x1","x2":"x2"}}}}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/simulate/src/test/index.ts b/test/features/simulate/src/test/index.ts index 70a13ca0b..da98db213 100644 --- a/test/features/simulate/src/test/index.ts +++ b/test/features/simulate/src/test/index.ts @@ -16,7 +16,14 @@ async function main(): Promise { simulate: true, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/simulate/swagger.json b/test/features/simulate/swagger.json index b5efaf7e4..19abb06f4 100644 --- a/test/features/simulate/swagger.json +++ b/test/features/simulate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true},{"name":"input","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"Page request info","required":true}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"Target article ID","required":true}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/first/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"description":"Target data","required":true}],"responses":{"200":{"description":"The first article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get first article of a day","description":"Get first article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"Target article ID","required":true}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/first/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"description":"Target data","required":true}],"responses":{"200":{"description":"The first article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get first article of a day","description":"Get first article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/status/src/test/index.ts b/test/features/status/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/status/src/test/index.ts +++ b/test/features/status/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/status/swagger.json b/test/features/status/swagger.json index 3a76e121a..a9b99548b 100644 --- a/test/features/status/swagger.json +++ b/test/features/status/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/status/random":{"get":{"tags":[],"parameters":[],"responses":{"300":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/status/random":{"get":{"tags":[],"parameters":[],"responses":{"300":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/swagger-customizer/src/test/index.ts b/test/features/swagger-customizer/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/swagger-customizer/src/test/index.ts +++ b/test/features/swagger-customizer/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/swagger-customizer/swagger.json b/test/features/swagger-customizer/swagger.json index 61218995d..a61adfae7 100644 --- a/test/features/swagger-customizer/swagger.json +++ b/test/features/swagger-customizer/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.3.2", - "title": "@nestia/test", + "version": "3.5.0", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git "a/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" "b/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" index 98fe96b4d..526390c8f 100644 --- "a/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" +++ "b/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" @@ -20,7 +20,14 @@ async function main(): Promise { host: "http://127.0.0.1:37000", }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/swagger/src/test/index.ts b/test/features/swagger/src/test/index.ts index 98fe96b4d..526390c8f 100644 --- a/test/features/swagger/src/test/index.ts +++ b/test/features/swagger/src/test/index.ts @@ -20,7 +20,14 @@ async function main(): Promise { host: "http://127.0.0.1:37000", }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/tags/src/test/index.ts b/test/features/tags/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/tags/src/test/index.ts +++ b/test/features/tags/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/tags/swagger.json b/test/features/tags/swagger.json index a3de3fee8..e94cc2542 100644 --- a/test/features/tags/swagger.json +++ b/test/features/tags/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.3.2", - "title": "@nestia/test", + "version": "3.5.0", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git a/test/features/variable/src/test/index.ts b/test/features/variable/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/variable/src/test/index.ts +++ b/test/features/variable/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/variable/swagger.json b/test/features/variable/swagger.json index 183c086ed..bcfaa0845 100644 --- a/test/features/variable/swagger.json +++ b/test/features/variable/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/package/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true},{"name":"input","in":"query","schema":{"$ref":"#/components/schemas/IPage.IRequest"},"description":"Page request info","required":true}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/package/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"Target article ID","required":true}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."},"delete":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"responses":{"200":{"description":""}},"summary":"Delete an article","description":"Delete an article."}},"/bbs/package/{section}/articles/new/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"description":"Target data","required":true}],"responses":{"200":{"description":"The new article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get new article of a day","description":"Get new article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/package/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/package/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"Target article ID","required":true}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."},"delete":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"responses":{"200":{"description":""}},"summary":"Delete an article","description":"Delete an article."}},"/bbs/package/{section}/articles/new/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"description":"Target data","required":true}],"responses":{"200":{"description":"The new article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get new article of a day","description":"Get new article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/websocket-clone/src/test/index.ts b/test/features/websocket-clone/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/websocket-clone/src/test/index.ts +++ b/test/features/websocket-clone/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/websocket-clone/swagger.json b/test/features/websocket-clone/swagger.json index d17f23b89..0b94f9773 100644 --- a/test/features/websocket-clone/swagger.json +++ b/test/features/websocket-clone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/websocket/src/test/index.ts b/test/features/websocket/src/test/index.ts index 3e74f8d31..3fdf74090 100644 --- a/test/features/websocket/src/test/index.ts +++ b/test/features/websocket/src/test/index.ts @@ -18,7 +18,14 @@ async function main(): Promise { }, }, ], - })(`${__dirname}/features`); + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.started_at).getTime() - + new Date(exec.completed_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); await server.close(); const exceptions: Error[] = report.executions diff --git a/test/features/websocket/swagger.json b/test/features/websocket/swagger.json index d17f23b89..0b94f9773 100644 --- a/test/features/websocket/swagger.json +++ b/test/features/websocket/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.3.2","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/package.json b/test/package.json index 2083c4c7b..06892daca 100644 --- a/test/package.json +++ b/test/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "@nestia/test", + "name": "@samchon/nestia-test", "version": "3.5.0", "description": "Test program of Nestia", "main": "index.js", @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.5.0", + "@nestia/sdk": "../packages/sdk/nestia-sdk-3.5.0.tgz", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.0", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.5.0", - "@nestia/e2e": "^0.3.6", - "@nestia/fetcher": "^3.5.0", + "@nestia/core": "../packages/core/nestia-core-3.5.0.tgz", + "@nestia/e2e": "^0.7.0", + "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.5.0.tgz", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From 2089272b579e9ffeff12ec903ad67990c45b9651 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 11 Jul 2024 03:30:39 +0900 Subject: [PATCH 017/204] Supports parameter directly commented. --- .github/workflows/build.yml | 5 +- .github/workflows/website.yml | 3 - benchmark/package.json | 2 +- deploy/publish.js | 4 +- package.json | 2 +- packages/core/package.json | 12 +- packages/fetcher/package.json | 4 +- packages/sdk/package.json | 16 +- .../analyses/TypedHttpOperationAnalyzer.ts | 2 + .../sdk/src/generates/SwaggerGenerator.ts | 21 +- .../internal/SdkHttpRouteProgrammer.ts | 63 +- .../internal/SwaggerDescriptionGenerator.ts | 44 ++ .../internal/SwaggerSchemaGenerator.ts | 32 +- .../sdk/src/structures/ITypedHttpRoute.ts | 2 + .../packages/api/package.json | 2 +- .../packages/api/package.json | 2 +- .../distribute-json/packages/api/package.json | 2 +- .../distribute/packages/api/package.json | 2 +- test/features/param/nestia.config.ts | 1 + .../param/src/api/functional/param/index.ts | 56 ++ .../src/controllers/TypedParamController.ts | 46 +- .../api/automated/test_api_param_composite.ts | 13 + test/features/param/swagger.json | 546 +++++++++++++++++- test/package.json | 12 +- website/package.json | 4 +- 25 files changed, 820 insertions(+), 78 deletions(-) create mode 100644 packages/sdk/src/generates/internal/SwaggerDescriptionGenerator.ts create mode 100644 test/features/param/src/test/features/api/automated/test_api_param_composite.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9313a8ea4..8ca41be33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,9 +21,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.x - - uses: pnpm/action-setup@v4 - with: - version: 8 - name: test working-directory: ./test @@ -31,4 +28,4 @@ jobs: - name: migrate working-directory: ./packages/migrate - run: pnpm install && npm run build && npm run test + run: npm install && npm run build && npm run test diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 739ae939c..eb85254e8 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -14,9 +14,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.x - - uses: pnpm/action-setup@v4 - with: - version: 8 - name: Root Install run: npm run package:tgz - name: Build diff --git a/benchmark/package.json b/benchmark/package.json index db6f3a5df..a0acddfcd 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -42,7 +42,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.4.2" + "typia": "^6.4.3" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/deploy/publish.js b/deploy/publish.js index ad4cd8ecc..bfab55cff 100644 --- a/deploy/publish.js +++ b/deploy/publish.js @@ -25,7 +25,7 @@ const setup = (tag) => (version) => (directory) => { ) { if (tag === "tgz" && fs.existsSync(`${directory}/node_modules/${key}`)) try { - execute(directory)(`pnpm uninstall ${key}`); + execute(directory)(`npm uninstall ${key}`); } catch {} record[key] = tag === "tgz" @@ -51,7 +51,7 @@ const setup = (tag) => (version) => (directory) => { // SETUP UPDATED DEPENDENCIES fs.writeFileSync(file, JSON.stringify(info, null, 2), "utf8"); // execute(directory)("npm cache clean --force"); - execute(directory)(`pnpm install`); + execute(directory)(`npm install`); }; const deploy = (tag) => (version) => (name) => { diff --git a/package.json b/package.json index 0c0676dc6..fc042b4c2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.5.0", + "version": "3.6.0", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index 10a1975e4..e2df491cf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.5.0", + "version": "3.6.0", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,10 +36,10 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "../fetcher/nestia-fetcher-3.5.0.tgz", + "@nestia/fetcher": "^3.6.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.3.4", "detect-ts-node": "^1.0.5", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.4.2", + "typia": "^6.4.3", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.5.0", + "@nestia/fetcher": ">=3.6.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.4.2 <7.0.0" + "typia": ">=6.4.3 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 16dc1135a..0092dbf1b 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.5.0", + "version": "3.6.0", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -43,6 +43,6 @@ "src" ], "dependencies": { - "@samchon/openapi": "^0.3.0" + "@samchon/openapi": "^0.3.4" } } \ No newline at end of file diff --git a/packages/sdk/package.json b/packages/sdk/package.json index c28b6b317..beebaa6a4 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.5.0", + "version": "3.6.0", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,9 +32,9 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "../fetcher/nestia-fetcher-3.5.0.tgz", - "@nestia/core": "../core/nestia-core-3.5.0.tgz", - "@samchon/openapi": "^0.3.0", + "@nestia/fetcher": "^3.6.0", + "@nestia/core": "^3.6.0", + "@samchon/openapi": "^0.3.4", "cli": "^1.0.1", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -44,16 +44,16 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.4.2" + "typia": "^6.4.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.5.0", - "@nestia/core": ">=3.5.0", + "@nestia/fetcher": ">=3.6.0", + "@nestia/core": ">=3.6.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.4.2 <7.0.0" + "typia": ">=6.4.3 <7.0.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts b/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts index 03bd7c854..1b4614704 100644 --- a/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts +++ b/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts @@ -343,6 +343,8 @@ export namespace TypedHttpOperationAnalyzer { optional, type: tuple!.type, typeName: tuple!.typeName, + description: CommentFactory.description(props.symbol), + jsDocTags: props.symbol.getJsDocTags(), }; }; } diff --git a/packages/sdk/src/generates/SwaggerGenerator.ts b/packages/sdk/src/generates/SwaggerGenerator.ts index 1828058f7..8450a93ca 100644 --- a/packages/sdk/src/generates/SwaggerGenerator.ts +++ b/packages/sdk/src/generates/SwaggerGenerator.ts @@ -16,6 +16,7 @@ import { ITypedHttpRoute } from "../structures/ITypedHttpRoute"; import { ITypedWebSocketRoute } from "../structures/ITypedWebSocketRoute"; import { FileRetriever } from "../utils/FileRetriever"; import { MapUtil } from "../utils/MapUtil"; +import { SwaggerDescriptionGenerator } from "./internal/SwaggerDescriptionGenerator"; import { SwaggerSchemaGenerator } from "./internal/SwaggerSchemaGenerator"; export namespace SwaggerGenerator { @@ -388,21 +389,11 @@ export namespace SwaggerGenerator { ) !== undefined, ) .map((tag) => tag.text!.find((elem) => elem.kind === "text")!.text); - const description: string | undefined = route.description?.length - ? route.description - : undefined; - const summary: string | undefined = (() => { - if (description === undefined) return undefined; - - const [explicit] = getJsDocTexts("summary"); - if (explicit?.length) return explicit; - - const index: number = description.indexOf("\n"); - const top: string = ( - index === -1 ? description : description.substring(0, index) - ).trim(); - return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined; - })(); + const { summary, description } = SwaggerDescriptionGenerator.generate({ + description: route.description, + jsDocTags: route.jsDocTags, + kind: "summary", + }); const deprecated = route.jsDocTags.find( (tag) => tag.name === "deprecated", ); diff --git a/packages/sdk/src/generates/internal/SdkHttpRouteProgrammer.ts b/packages/sdk/src/generates/internal/SdkHttpRouteProgrammer.ts index ec8188b06..623a40fbc 100644 --- a/packages/sdk/src/generates/internal/SdkHttpRouteProgrammer.ts +++ b/packages/sdk/src/generates/internal/SdkHttpRouteProgrammer.ts @@ -33,37 +33,70 @@ export namespace SdkHttpRouteProgrammer { const describe = (route: ITypedHttpRoute): string => { // MAIN DESCRIPTION - const comments: string[] = route.description + const descriptionComments: string[] = route.description ? route.description.split("\n") : []; + const tagComments: string[] = []; + + // PARMAETERS + for (const p of route.parameters) { + if (p.category === "headers") continue; + + const description: string | undefined = + p.description ?? + p.jsDocTags.find((tag) => tag.name === "description")?.text?.[0].text ?? + route.jsDocTags + .find((tag) => tag.name === "param" && tag.text?.[0].text === p.name) + ?.text?.map((e) => e.text) + .join("") + .substring(p.name.length); + if (!description?.length) continue; + + tagComments.push( + `@param ${p.name} ${description + .split("\n") + .map((str) => str.trim()) + .map((str, i) => { + if (i === 0) return str; + const rpad: number = p.name.length + 8; + return `${" ".repeat(rpad)}${str}`; + }) + .join("\n")}`, + ); + } // COMMENT TAGS const tags: IJsDocTagInfo[] = route.jsDocTags.filter( - (tag) => - tag.name !== "param" || - route.parameters - .filter((p) => p.category !== "headers") - .some((p) => p.name === tag.text?.[0]?.text), + (tag) => tag.name !== "param", ); if (tags.length !== 0) { const content: string[] = tags.map((t) => t.text?.length - ? `@${t.name} ${t.text.map((e) => e.text).join("")}` + ? `@${t.name} ${t.text + .map((e) => e.text) + .join("") + .split("\n") + .map((str) => str.trim()) + .map((str, i) => { + if (i === 0) return str; + return `${" ".repeat(t.name.length + 1)} ${str}`; + }) + .join("\n")}` : `@${t.name}`, ); - comments.push("", ...new Set(content)); + tagComments.push(...new Set(content)); } // EXCEPTIONS for (const [key, value] of Object.entries(route.exceptions)) { if ( - comments.some( + tagComments.some( (str) => str.startsWith(`@throw ${key}`) || str.startsWith(`@throws ${key}`), ) ) continue; - comments.push( + tagComments.push( value.description?.length ? `@throws ${key} ${value.description.split("\n")[0]}` : `@throws ${key}`, @@ -71,12 +104,14 @@ export namespace SdkHttpRouteProgrammer { } // POSTFIX - if (!!comments.length) comments.push(""); - comments.push( + return [ + ...descriptionComments, + ...(descriptionComments.length && tagComments.length ? [""] : []), + ...tagComments, + ...(descriptionComments.length && tagComments.length ? [""] : []), `@controller ${route.controller.name}.${route.name}`, `@path ${route.method} ${route.path}`, `@nestia Generated by Nestia - https://github.com/samchon/nestia`, - ); - return comments.join("\n"); + ].join("\n"); }; } diff --git a/packages/sdk/src/generates/internal/SwaggerDescriptionGenerator.ts b/packages/sdk/src/generates/internal/SwaggerDescriptionGenerator.ts new file mode 100644 index 000000000..5d6a65ffc --- /dev/null +++ b/packages/sdk/src/generates/internal/SwaggerDescriptionGenerator.ts @@ -0,0 +1,44 @@ +import { IJsDocTagInfo } from "typia"; + +export namespace SwaggerDescriptionGenerator { + export const generate = (props: { + description?: string; + jsDocTags: IJsDocTagInfo[]; + kind: Kind; + }): Kind extends "summary" + ? { summary?: string; description?: string } + : { title?: string; description?: string } => { + const title: string | undefined = (() => { + const [explicit] = getJsDocTexts({ + jsDocTags: props.jsDocTags, + name: props.kind, + }); + if (explicit?.length) return explicit; + else if (props.description === undefined) return undefined; + + const index: number = props.description.indexOf("\n"); + const top: string = ( + index === -1 ? props.description : props.description.substring(0, index) + ).trim(); + return top.endsWith(".") ? top.substring(0, top.length - 1) : undefined; + })(); + return { + [props.kind]: title, + description: props.description?.length ? props.description : undefined, + } as any; + }; + + const getJsDocTexts = (props: { + jsDocTags: IJsDocTagInfo[]; + name: string; + }): string[] => + props.jsDocTags + .filter( + (tag) => + tag.name === props.name && + tag.text && + tag.text.find((elem) => elem.kind === "text" && elem.text.length) !== + undefined, + ) + .map((tag) => tag.text!.find((elem) => elem.kind === "text")!.text); +} diff --git a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts index 5e97e0db8..4991cce48 100644 --- a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts +++ b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts @@ -12,6 +12,7 @@ import { ISwaggerError } from "../../structures/ISwaggerError"; import { ISwaggerLazyProperty } from "../../structures/ISwaggerLazyProperty"; import { ISwaggerLazySchema } from "../../structures/ISwaggerLazySchema"; import { ITypedHttpRoute } from "../../structures/ITypedHttpRoute"; +import { SwaggerDescriptionGenerator } from "./SwaggerDescriptionGenerator"; import { SwaggerSchemaValidator } from "./SwaggerSchemaValidator"; export namespace SwaggerSchemaGenerator { @@ -321,8 +322,12 @@ export namespace SwaggerSchemaGenerator { ? "header" : (param.category as "path"), schema, - description: p.description ?? undefined, required: p.value.isRequired(), + ...SwaggerDescriptionGenerator.generate({ + description: p.description ?? undefined, + jsDocTags: p.jsDocTags, + kind: "title", + }), } satisfies OpenApi.IOperation.IParameter; }); }; @@ -331,21 +336,34 @@ export namespace SwaggerSchemaGenerator { (props: IProps) => (route: ITypedHttpRoute) => ( - param: ITypedHttpRoute.IParameter, + p: ITypedHttpRoute.IParameter, result: ValidationPipe, ): OpenApi.IOperation.IParameter => { const schema: OpenApi.IJsonSchema = coalesce(props)(result); return { - name: param.field ?? param.name, + name: p.field ?? p.name, in: - param.category === "headers" + p.category === "headers" ? "header" - : param.category === "param" + : p.category === "param" ? "path" : "query", schema, - description: describe(route, "param", param.name) ?? "", - required: result.success ? result.data.isRequired() : true, + ...SwaggerDescriptionGenerator.generate({ + description: + p.description ?? + p.jsDocTags.find((tag) => tag.name === "description")?.text?.[0] + .text ?? + route.jsDocTags + .find( + (tag) => tag.name === "param" && tag.text?.[0].text === p.name, + ) + ?.text?.map((e) => e.text) + .join("") + .substring(p.name.length), + jsDocTags: p.jsDocTags, + kind: "title", + }), }; }; diff --git a/packages/sdk/src/structures/ITypedHttpRoute.ts b/packages/sdk/src/structures/ITypedHttpRoute.ts index 2a3645e55..462570512 100644 --- a/packages/sdk/src/structures/ITypedHttpRoute.ts +++ b/packages/sdk/src/structures/ITypedHttpRoute.ts @@ -41,6 +41,8 @@ export namespace ITypedHttpRoute { type: ts.Type; typeName: string; metadata?: Metadata; + description?: string; + jsDocTags: ts.JSDocTagInfo[]; }; export interface IOutput { type: ts.Type; diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index d0892f959..7b62d4723 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.2" + "typia": "^6.4.3" } } \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index d0892f959..7b62d4723 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.2" + "typia": "^6.4.3" } } \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index d0892f959..7b62d4723 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.2" + "typia": "^6.4.3" } } \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index d0892f959..7b62d4723 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.2" + "typia": "^6.4.3" } } \ No newline at end of file diff --git a/test/features/param/nestia.config.ts b/test/features/param/nestia.config.ts index e4547d955..b704b4adc 100644 --- a/test/features/param/nestia.config.ts +++ b/test/features/param/nestia.config.ts @@ -5,6 +5,7 @@ export const NESTIA_CONFIG: INestiaConfig = { output: "src/api", e2e: "src/test", swagger: { + beautify: true, output: "swagger.json", security: { bearer: { diff --git a/test/features/param/src/api/functional/param/index.ts b/test/features/param/src/api/functional/param/index.ts index 4faa9c1e7..be3bc630d 100644 --- a/test/features/param/src/api/functional/param/index.ts +++ b/test/features/param/src/api/functional/param/index.ts @@ -9,6 +9,54 @@ import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; import type { Format } from "typia/lib/tags/Format"; /** + * Composite path parameters. + * + * @param value The first value. + * The first string value. + * @param value2 The second value. + * The second string value. + * @returns Concatenated string. + * + * @controller TypedParamController.composite + * @path GET /param/:value/composite/:value2 + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function composite( + connection: IConnection, + value: string, + value2: string, +): Promise { + return PlainFetcher.fetch(connection, { + ...composite.METADATA, + template: composite.METADATA.path, + path: composite.path(value, value2), + }); +} +export namespace composite { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/param/:value/composite/:value2", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (value: string, value2: string) => + `/param/${encodeURIComponent(value ?? "null")}/composite/${encodeURIComponent(value2 ?? "null")}`; +} + +/** + * Boolean path parameter. + * + * @param value The boolean value. + * The boolean value as a path parameter. + * @returns The same boolean value. + * * @controller TypedParamController.boolean * @path GET /param/:value/boolean * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -42,6 +90,10 @@ export namespace boolean { } /** + * The number. + * + * @param value Description in the parameter. + * * @controller TypedParamController.number * @path GET /param/:value/number * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -75,6 +127,10 @@ export namespace number { } /** + * The string. + * + * @param value Yoohoo + * * @controller TypedParamController.string * @path GET /param/:value/string * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/param/src/controllers/TypedParamController.ts b/test/features/param/src/controllers/TypedParamController.ts index e2d28cf7c..8b3759a0f 100644 --- a/test/features/param/src/controllers/TypedParamController.ts +++ b/test/features/param/src/controllers/TypedParamController.ts @@ -4,18 +4,60 @@ import { tags } from "typia"; @Controller("param") export class TypedParamController { + /** + * Composite path parameters. + * + * @param value The first value. + * The first string value. + * @param value2 The second value. + * The second string value. + * @returns Concatenated string. + */ + @core.TypedRoute.Get(":value/composite/:value2") + public composite( + @core.TypedParam("value") value: string, + @core.TypedParam("value2") value2: string, + ): string { + return value + value2; + } + + /** + * Boolean path parameter. + * + * @param value The boolean value. + * The boolean value as a path parameter. + * @returns The same boolean value. + */ @core.TypedRoute.Get(":value/boolean") public boolean(@core.TypedParam("value") value: boolean): boolean { return value; } + /** + * The number. + */ @core.TypedRoute.Get(":value/number") - public number(@core.TypedParam("value") value: number): number { + public number( + /** + * Description in the parameter. + */ + @core.TypedParam("value") + value: number + ): number { return value; } + /** + * The string. + */ @core.TypedRoute.Get(":value/string") - public string(@core.TypedParam("value") value: string): string { + public string( + /** + * @title Yaho + * @description Yoohoo + */ + @core.TypedParam("value") value: string + ): string { return value; } diff --git a/test/features/param/src/test/features/api/automated/test_api_param_composite.ts b/test/features/param/src/test/features/api/automated/test_api_param_composite.ts new file mode 100644 index 000000000..0761d06a8 --- /dev/null +++ b/test/features/param/src/test/features/api/automated/test_api_param_composite.ts @@ -0,0 +1,13 @@ +import type { Primitive } from "@nestia/fetcher"; +import typia from "typia"; + +import api from "../../../../api"; + +export const test_api_param_composite = async (connection: api.IConnection) => { + const output: Primitive = await api.functional.param.composite( + connection, + typia.random(), + typia.random(), + ); + typia.assert(output); +}; diff --git a/test/features/param/swagger.json b/test/features/param/swagger.json index 9d1313491..c744fbc33 100644 --- a/test/features/param/swagger.json +++ b/test/features/param/swagger.json @@ -1 +1,545 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}},"/param/{value}/uuid":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/date":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string","format":"date"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/uuid_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/date_nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"date"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.5.1-dev.20240710", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/health": { + "get": { + "tags": [], + "parameters": [], + "responses": { + "200": { + "description": "" + } + } + } + }, + "/performance": { + "get": { + "tags": [], + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IPerformance" + } + } + } + } + } + } + }, + "/param/{value}/composite/{value2}": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "string" + }, + "title": "The first value", + "description": " The first value.\r\nThe first string value." + }, + { + "name": "value2", + "in": "path", + "schema": { + "type": "string" + }, + "title": "The second value", + "description": " The second value.\r\nThe second string value." + } + ], + "responses": { + "200": { + "description": "Concatenated string.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "summary": "Composite path parameters", + "description": "Composite path parameters." + } + }, + "/param/{value}/boolean": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "boolean" + }, + "title": "The boolean value", + "description": " The boolean value.\r\nThe boolean value as a path parameter." + } + ], + "responses": { + "200": { + "description": "The same boolean value.", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + } + }, + "summary": "Boolean path parameter", + "description": "Boolean path parameter." + } + }, + "/param/{value}/number": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "number" + }, + "title": "Description in the parameter", + "description": "Description in the parameter." + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "number" + } + } + } + } + }, + "summary": "The number", + "description": "The number." + } + }, + "/param/{value}/string": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "string" + }, + "title": "Yaho", + "description": "Yoohoo" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "summary": "The string", + "description": "The string." + } + }, + "/param/{value}/nullable": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + } + } + } + } + } + }, + "/param/{value}/literal": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "oneOf": [ + { + "const": "A" + }, + { + "const": "B" + }, + { + "const": "C" + } + ] + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "const": "A" + }, + { + "const": "B" + }, + { + "const": "C" + } + ] + } + } + } + } + } + } + }, + "/param/{value}/uuid": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/param/{value}/date": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "type": "string", + "format": "date" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/param/{value}/uuid_nullable": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "uuid" + } + ] + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + } + } + } + } + } + }, + "/param/{value}/date_nullable": { + "get": { + "tags": [], + "parameters": [ + { + "name": "value", + "in": "path", + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "date" + } + ] + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "IPerformance": { + "type": "object", + "properties": { + "cpu": { + "$ref": "#/components/schemas/process.global.NodeJS.CpuUsage" + }, + "memory": { + "$ref": "#/components/schemas/process.global.NodeJS.MemoryUsage" + }, + "resource": { + "$ref": "#/components/schemas/process.global.NodeJS.ResourceUsage" + } + }, + "required": [ + "cpu", + "memory", + "resource" + ], + "description": "Performance info." + }, + "process.global.NodeJS.CpuUsage": { + "type": "object", + "properties": { + "user": { + "type": "number" + }, + "system": { + "type": "number" + } + }, + "required": [ + "user", + "system" + ] + }, + "process.global.NodeJS.MemoryUsage": { + "type": "object", + "properties": { + "rss": { + "type": "number" + }, + "heapTotal": { + "type": "number" + }, + "heapUsed": { + "type": "number" + }, + "external": { + "type": "number" + }, + "arrayBuffers": { + "type": "number" + } + }, + "required": [ + "rss", + "heapTotal", + "heapUsed", + "external", + "arrayBuffers" + ] + }, + "process.global.NodeJS.ResourceUsage": { + "type": "object", + "properties": { + "fsRead": { + "type": "number" + }, + "fsWrite": { + "type": "number" + }, + "involuntaryContextSwitches": { + "type": "number" + }, + "ipcReceived": { + "type": "number" + }, + "ipcSent": { + "type": "number" + }, + "majorPageFault": { + "type": "number" + }, + "maxRSS": { + "type": "number" + }, + "minorPageFault": { + "type": "number" + }, + "sharedMemorySize": { + "type": "number" + }, + "signalsCount": { + "type": "number" + }, + "swappedOut": { + "type": "number" + }, + "systemCPUTime": { + "type": "number" + }, + "unsharedDataSize": { + "type": "number" + }, + "unsharedStackSize": { + "type": "number" + }, + "userCPUTime": { + "type": "number" + }, + "voluntaryContextSwitches": { + "type": "number" + } + }, + "required": [ + "fsRead", + "fsWrite", + "involuntaryContextSwitches", + "ipcReceived", + "ipcSent", + "majorPageFault", + "maxRSS", + "minorPageFault", + "sharedMemorySize", + "signalsCount", + "swappedOut", + "systemCPUTime", + "unsharedDataSize", + "unsharedStackSize", + "userCPUTime", + "voluntaryContextSwitches" + ] + } + }, + "securitySchemes": { + "bearer": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file diff --git a/test/package.json b/test/package.json index 06892daca..03cd14786 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.5.0", + "version": "3.6.0", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,9 +26,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "../packages/sdk/nestia-sdk-3.5.0.tgz", + "@nestia/sdk": "^3.6.0", "@nestjs/swagger": "^7.1.2", - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.3.4", "@types/express": "^4.17.17", "@types/node": "20.11.16", "@types/uuid": "^9.0.8", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "../packages/core/nestia-core-3.5.0.tgz", + "@nestia/core": "^3.6.0", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.5.0.tgz", + "@nestia/fetcher": "^3.6.0", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.4.2", + "typia": "^6.4.3", "uuid": "^9.0.1" } } \ No newline at end of file diff --git a/website/package.json b/website/package.json index 0f45708b3..9e32ac508 100644 --- a/website/package.json +++ b/website/package.json @@ -24,7 +24,7 @@ "@mui/material": "5.15.6", "@mui/system": "5.15.6", "@nestia/migrate": "^0.14.1", - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.3.4", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.4.2" + "typia": "^6.4.3" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", From 5c886ca49e8a77e3c0d2474340c73abec35b32b8 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 11 Jul 2024 10:23:29 +0900 Subject: [PATCH 018/204] Fix schema.required omitted mistake. --- README.md | 5 +- package.json | 2 +- packages/benchmark/README.md | 87 +++++++ packages/benchmark/package.json | 8 +- packages/core/README.md | 5 +- packages/core/package.json | 6 +- packages/fetcher/README.md | 5 +- packages/fetcher/package.json | 2 +- packages/sdk/README.md | 5 +- packages/sdk/package.json | 10 +- .../internal/SwaggerSchemaGenerator.ts | 1 + test/features/all/src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../app-globalPrefix/src/test/index.ts | 4 +- .../app-routerModule/src/test/index.ts | 4 +- .../app-versionHeader/src/test/index.ts | 4 +- .../features/app-versionUri/src/test/index.ts | 4 +- test/features/app/src/test/index.ts | 4 +- test/features/beautify-4/src/test/index.ts | 4 +- .../features/beautify-false/src/test/index.ts | 4 +- test/features/beautify/src/test/index.ts | 4 +- .../body-config-assert/src/test/index.ts | 4 +- .../body-config-assertClone/src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../body-config-assertPrune/src/test/index.ts | 4 +- .../body-config-equals/src/test/index.ts | 4 +- .../features/body-config-is/src/test/index.ts | 4 +- .../body-config-validate/src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../body-generic-default/src/test/index.ts | 4 +- .../body-manual-assert/src/test/index.ts | 4 +- .../features/body-manual-is/src/test/index.ts | 4 +- .../body-manual-validate/src/test/index.ts | 4 +- test/features/body/src/test/index.ts | 4 +- .../cli-config-project/src/test/index.ts | 4 +- test/features/cli-config/src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../clone-and-propagate/src/test/index.ts | 4 +- .../features/clone-implicit/src/test/index.ts | 4 +- test/features/clone-native/src/test/index.ts | 4 +- .../features/config-pattern/src/test/index.ts | 4 +- test/features/date/src/test/index.ts | 4 +- test/features/duplicated/src/test/index.ts | 4 +- test/features/e2e/src/test/index.ts | 4 +- test/features/encrypted/src/test/index.ts | 4 +- .../exception-filter/src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- test/features/exception/src/test/index.ts | 4 +- test/features/fastify/src/test/index.ts | 4 +- .../headers-decompose/src/test/index.ts | 4 +- test/features/headers/src/test/index.ts | 4 +- test/features/ignore/src/test/index.ts | 4 +- .../features/implicit-error/src/test/index.ts | 4 +- test/features/kebab/src/test/index.ts | 4 +- test/features/method/src/test/index.ts | 4 +- test/features/migrate/src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../multipart-form-data/src/test/index.ts | 4 +- test/features/non-equals/src/test/index.ts | 4 +- test/features/operationId/src/test/index.ts | 4 +- test/features/param/src/test/index.ts | 4 +- test/features/plain/src/test/index.ts | 4 +- test/features/propagate/src/test/index.ts | 4 +- .../query-decompose-false/nestia.config.ts | 1 + .../query-decompose-false/src/test/index.ts | 4 +- .../query-decompose-false/swagger.json | 236 +++++++++++++++++- .../query-decompose-true/src/test/index.ts | 4 +- .../query-decompose-true/swagger.json | 2 +- test/features/query/src/test/index.ts | 4 +- test/features/query/swagger.json | 2 +- .../src/test/index.ts | 4 +- .../route-manual-assert/src/test/index.ts | 4 +- .../features/route-manual-assert/swagger.json | 2 +- .../route-manual-is/src/test/index.ts | 4 +- test/features/route-manual-is/swagger.json | 2 +- .../route-manual-stringify/src/test/index.ts | 4 +- .../route-manual-stringify/swagger.json | 2 +- .../route-manual-validate/src/test/index.ts | 4 +- .../route-manual-validate/swagger.json | 2 +- test/features/route/src/test/index.ts | 4 +- test/features/route/swagger.json | 2 +- .../src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../src/test/index.ts | 4 +- .../security/src/api/functional/index.ts | 8 - test/features/security/src/test/index.ts | 4 +- test/features/security/swagger.json | 2 +- .../functional/sellers/authenticate/index.ts | 1 - test/features/simulate/src/test/index.ts | 4 +- test/features/simulate/swagger.json | 2 +- test/features/status/src/test/index.ts | 4 +- test/features/status/swagger.json | 2 +- .../swagger-customizer/src/test/index.ts | 4 +- test/features/swagger-customizer/swagger.json | 5 +- .../src/test/index.ts" | 4 +- test/features/swagger/src/test/index.ts | 4 +- test/features/tags/src/test/index.ts | 4 +- test/features/tags/swagger.json | 14 +- test/features/variable/src/test/index.ts | 4 +- test/features/variable/swagger.json | 2 +- .../websocket-clone/src/test/index.ts | 4 +- test/features/websocket-clone/swagger.json | 2 +- test/features/websocket/src/test/index.ts | 4 +- test/features/websocket/swagger.json | 2 +- test/package.json | 8 +- 108 files changed, 525 insertions(+), 218 deletions(-) create mode 100644 packages/benchmark/README.md diff --git a/README.md b/README.md index f15c2baa7..796a338f1 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,8 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator - - `@nestia/e2e` - - Test program utilizing e2e test functions - - Benchmark program using e2e test functions + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor - `nestia`: Just CLI (command line interface) tool diff --git a/package.json b/package.json index fc042b4c2..34cd61a60 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.6.0", + "version": "3.6.1", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/benchmark/README.md b/packages/benchmark/README.md new file mode 100644 index 000000000..796a338f1 --- /dev/null +++ b/packages/benchmark/README.md @@ -0,0 +1,87 @@ +# Nestia +![Nestia Logo](https://nestia.io/logo.png) + +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) +[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) +[![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) +[![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) + +Nestia is a set of helper libraries for NestJS, supporting below features: + + - `@nestia/core`: + - Super-fast/easy decorators + - Advanced WebSocket routes + - `@nestia/sdk`: + - Swagger generator evolved than ever + - SDK library generator for clients + - Mockup Simulator for client applications + - Automatic E2E test functions generator + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions + - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK + - `@nestia/editor`: Swagger-UI with Online TypeScript Editor + - `nestia`: Just CLI (command line interface) tool + +> [!NOTE] +> +> - **Only one line** required, with pure TypeScript type +> - Enhance performance **30x** up +> - Runtime validator is **20,000x faster** than `class-validator` +> - JSON serialization is **200x faster** than `class-transformer` +> - Software Development Kit +> - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/) +> - Mockup simulator means embedded backend simulator in the SDK +> - similar with [msw](https://mswjs.io/), but fully automated + +![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif) + +> Left is NestJS server code, and right is client (frontend) code utilizing SDK + + + + +## Sponsors and Backers +Thanks for your support. + +Your donation would encourage `nestia` development. + +[![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia) + + + + +## Guide Documents +Check out the document in the [website](https://nestia.io/docs/): + +### 🏠 Home + - [Introduction](https://nestia.io/docs/) + - [Setup](https://nestia.io/docs/setup/) + - [Pure TypeScript](https://nestia.io/docs/pure) + +### 📖 Features + - Core Library + - [WebSocketRoute](https://nestia.io/docs/core/WebSocketRoute) + - [TypedRoute](https://nestia.io/docs/core/TypedRoute/) + - [TypedBody](https://nestia.io/docs/core/TypedBody/) + - [TypedParam](https://nestia.io/docs/core/TypedParam/) + - [TypedQuery](https://nestia.io/docs/core/TypedQuery/) + - [TypedHeaders](https://nestia.io/docs/core/TypedHeaders/) + - [TypedException](https://nestia.io/docs/core/TypedException/) + - Generators + - [Swagger Documents](https://nestia.io/docs/sdk/swagger/) + - [Software Development Kit](https://nestia.io/docs/sdk/sdk/) + - [E2E Functions](https://nestia.io/docs/sdk/e2e/) + - [Mockup Simulator](https://nestia.io/docs/sdk/simulator/) + - E2E Testing + - [Why E2E Test?](https://nestia.io/docs/e2e/why/) + - [Test Program Development](https://nestia.io/docs/e2e/development/) + - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/) + - [Swagger to NestJS](https://nestia.io/docs/migrate/) + - [TypeScript Swagger Editor](https://nestia.io/docs/editor/) + +### 🔗 Appendix + - [API Documents](https://nestia.io/api) + - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz) + - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751) diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 4fde820c3..e997acefe 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/benchmark", - "version": "0.1.0", + "version": "0.1.1", "description": "NestJS Performance Benchmark Program", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -22,9 +22,9 @@ "author": "Jeongho Nam", "license": "MIT", "devDependencies": { - "@nestia/core": "^3.5.0", + "@nestia/core": "^3.6.1", "@nestia/e2e": "^0.7.0", - "@nestia/sdk": "^3.5.0", + "@nestia/sdk": "^3.6.1", "@nestjs/common": "^10.3.10", "@nestjs/core": "^10.3.10", "@nestjs/platform-express": "^10.3.10", @@ -38,7 +38,7 @@ "uuid": "^10.0.0" }, "dependencies": { - "@nestia/fetcher": "^3.5.0", + "@nestia/fetcher": "^3.6.1", "tgrid": "^1.0.2", "tstl": "^3.0.0" }, diff --git a/packages/core/README.md b/packages/core/README.md index f15c2baa7..796a338f1 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -18,9 +18,8 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator - - `@nestia/e2e` - - Test program utilizing e2e test functions - - Benchmark program using e2e test functions + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor - `nestia`: Just CLI (command line interface) tool diff --git a/packages/core/package.json b/packages/core/package.json index e2df491cf..2739f3dc8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.6.0", + "version": "3.6.1", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.6.0", + "@nestia/fetcher": "^3.6.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.4", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.6.0", + "@nestia/fetcher": ">=3.6.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/README.md b/packages/fetcher/README.md index f15c2baa7..796a338f1 100644 --- a/packages/fetcher/README.md +++ b/packages/fetcher/README.md @@ -18,9 +18,8 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator - - `@nestia/e2e` - - Test program utilizing e2e test functions - - Benchmark program using e2e test functions + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor - `nestia`: Just CLI (command line interface) tool diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 0092dbf1b..e13d971d2 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.6.0", + "version": "3.6.1", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/README.md b/packages/sdk/README.md index f15c2baa7..796a338f1 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -18,9 +18,8 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator - - `@nestia/e2e` - - Test program utilizing e2e test functions - - Benchmark program using e2e test functions + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor - `nestia`: Just CLI (command line interface) tool diff --git a/packages/sdk/package.json b/packages/sdk/package.json index beebaa6a4..ec818c143 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.6.0", + "version": "3.6.1", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.6.0", - "@nestia/core": "^3.6.0", + "@nestia/fetcher": "^3.6.1", + "@nestia/core": "^3.6.1", "@samchon/openapi": "^0.3.4", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.4.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.6.0", - "@nestia/core": ">=3.6.0", + "@nestia/fetcher": ">=3.6.1", + "@nestia/core": ">=3.6.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts index 4991cce48..6751fadca 100644 --- a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts +++ b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts @@ -349,6 +349,7 @@ export namespace SwaggerSchemaGenerator { ? "path" : "query", schema, + required: result.success ? result.data.isRequired() : true, ...SwaggerDescriptionGenerator.generate({ description: p.description ?? diff --git a/test/features/all/src/test/index.ts b/test/features/all/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/all/src/test/index.ts +++ b/test/features/all/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts b/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts +++ b/test/features/app-globalPrefix-versionUri-routerModule/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app-globalPrefix-versionUri/src/test/index.ts b/test/features/app-globalPrefix-versionUri/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/app-globalPrefix-versionUri/src/test/index.ts +++ b/test/features/app-globalPrefix-versionUri/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app-globalPrefix/src/test/index.ts b/test/features/app-globalPrefix/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/app-globalPrefix/src/test/index.ts +++ b/test/features/app-globalPrefix/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app-routerModule/src/test/index.ts b/test/features/app-routerModule/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/app-routerModule/src/test/index.ts +++ b/test/features/app-routerModule/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app-versionHeader/src/test/index.ts b/test/features/app-versionHeader/src/test/index.ts index f2915a8ba..45874aa66 100644 --- a/test/features/app-versionHeader/src/test/index.ts +++ b/test/features/app-versionHeader/src/test/index.ts @@ -24,8 +24,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app-versionUri/src/test/index.ts b/test/features/app-versionUri/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/app-versionUri/src/test/index.ts +++ b/test/features/app-versionUri/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/app/src/test/index.ts b/test/features/app/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/app/src/test/index.ts +++ b/test/features/app/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/beautify-4/src/test/index.ts b/test/features/beautify-4/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/beautify-4/src/test/index.ts +++ b/test/features/beautify-4/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/beautify-false/src/test/index.ts b/test/features/beautify-false/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/beautify-false/src/test/index.ts +++ b/test/features/beautify-false/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/beautify/src/test/index.ts b/test/features/beautify/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/beautify/src/test/index.ts +++ b/test/features/beautify/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-assert/src/test/index.ts b/test/features/body-config-assert/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-assert/src/test/index.ts +++ b/test/features/body-config-assert/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-assertClone/src/test/index.ts b/test/features/body-config-assertClone/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-assertClone/src/test/index.ts +++ b/test/features/body-config-assertClone/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-assertEquals/src/test/index.ts b/test/features/body-config-assertEquals/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-assertEquals/src/test/index.ts +++ b/test/features/body-config-assertEquals/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-assertPrune/src/test/index.ts b/test/features/body-config-assertPrune/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-assertPrune/src/test/index.ts +++ b/test/features/body-config-assertPrune/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-equals/src/test/index.ts b/test/features/body-config-equals/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-equals/src/test/index.ts +++ b/test/features/body-config-equals/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-is/src/test/index.ts b/test/features/body-config-is/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-is/src/test/index.ts +++ b/test/features/body-config-is/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-validate/src/test/index.ts b/test/features/body-config-validate/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-validate/src/test/index.ts +++ b/test/features/body-config-validate/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-validateClone/src/test/index.ts b/test/features/body-config-validateClone/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-validateClone/src/test/index.ts +++ b/test/features/body-config-validateClone/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-validateEquals/src/test/index.ts b/test/features/body-config-validateEquals/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-validateEquals/src/test/index.ts +++ b/test/features/body-config-validateEquals/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-config-validatePrune/src/test/index.ts b/test/features/body-config-validatePrune/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-config-validatePrune/src/test/index.ts +++ b/test/features/body-config-validatePrune/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-generic-default/src/test/index.ts b/test/features/body-generic-default/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/body-generic-default/src/test/index.ts +++ b/test/features/body-generic-default/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-manual-assert/src/test/index.ts b/test/features/body-manual-assert/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-manual-assert/src/test/index.ts +++ b/test/features/body-manual-assert/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-manual-is/src/test/index.ts b/test/features/body-manual-is/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-manual-is/src/test/index.ts +++ b/test/features/body-manual-is/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body-manual-validate/src/test/index.ts b/test/features/body-manual-validate/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/body-manual-validate/src/test/index.ts +++ b/test/features/body-manual-validate/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/body/src/test/index.ts b/test/features/body/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/body/src/test/index.ts +++ b/test/features/body/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/cli-config-project/src/test/index.ts b/test/features/cli-config-project/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/cli-config-project/src/test/index.ts +++ b/test/features/cli-config-project/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/cli-config/src/test/index.ts b/test/features/cli-config/src/test/index.ts index 0a03f783a..1a8e4372b 100644 --- a/test/features/cli-config/src/test/index.ts +++ b/test/features/cli-config/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/clone-and-exact-optional-property/src/test/index.ts b/test/features/clone-and-exact-optional-property/src/test/index.ts index 526390c8f..0451fb9a7 100644 --- a/test/features/clone-and-exact-optional-property/src/test/index.ts +++ b/test/features/clone-and-exact-optional-property/src/test/index.ts @@ -23,8 +23,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/clone-and-propagate/src/test/index.ts b/test/features/clone-and-propagate/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/clone-and-propagate/src/test/index.ts +++ b/test/features/clone-and-propagate/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/clone-implicit/src/test/index.ts b/test/features/clone-implicit/src/test/index.ts index 526390c8f..0451fb9a7 100644 --- a/test/features/clone-implicit/src/test/index.ts +++ b/test/features/clone-implicit/src/test/index.ts @@ -23,8 +23,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/clone-native/src/test/index.ts b/test/features/clone-native/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/clone-native/src/test/index.ts +++ b/test/features/clone-native/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/config-pattern/src/test/index.ts b/test/features/config-pattern/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/config-pattern/src/test/index.ts +++ b/test/features/config-pattern/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/date/src/test/index.ts b/test/features/date/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/date/src/test/index.ts +++ b/test/features/date/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/duplicated/src/test/index.ts b/test/features/duplicated/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/duplicated/src/test/index.ts +++ b/test/features/duplicated/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/e2e/src/test/index.ts b/test/features/e2e/src/test/index.ts index 526390c8f..0451fb9a7 100644 --- a/test/features/e2e/src/test/index.ts +++ b/test/features/e2e/src/test/index.ts @@ -23,8 +23,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/encrypted/src/test/index.ts b/test/features/encrypted/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/encrypted/src/test/index.ts +++ b/test/features/encrypted/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/exception-filter/src/test/index.ts b/test/features/exception-filter/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/exception-filter/src/test/index.ts +++ b/test/features/exception-filter/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/exception-with-propagate/src/test/index.ts b/test/features/exception-with-propagate/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/exception-with-propagate/src/test/index.ts +++ b/test/features/exception-with-propagate/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/exception/src/test/index.ts b/test/features/exception/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/exception/src/test/index.ts +++ b/test/features/exception/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/fastify/src/test/index.ts b/test/features/fastify/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/fastify/src/test/index.ts +++ b/test/features/fastify/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/headers-decompose/src/test/index.ts b/test/features/headers-decompose/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/headers-decompose/src/test/index.ts +++ b/test/features/headers-decompose/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/headers/src/test/index.ts b/test/features/headers/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/headers/src/test/index.ts +++ b/test/features/headers/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/ignore/src/test/index.ts b/test/features/ignore/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/ignore/src/test/index.ts +++ b/test/features/ignore/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/implicit-error/src/test/index.ts b/test/features/implicit-error/src/test/index.ts index 526390c8f..0451fb9a7 100644 --- a/test/features/implicit-error/src/test/index.ts +++ b/test/features/implicit-error/src/test/index.ts @@ -23,8 +23,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/kebab/src/test/index.ts b/test/features/kebab/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/kebab/src/test/index.ts +++ b/test/features/kebab/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/method/src/test/index.ts b/test/features/method/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/method/src/test/index.ts +++ b/test/features/method/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/migrate/src/test/index.ts b/test/features/migrate/src/test/index.ts index adba77c0c..909d7ce63 100644 --- a/test/features/migrate/src/test/index.ts +++ b/test/features/migrate/src/test/index.ts @@ -44,8 +44,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/multipart-form-data-fastify/src/test/index.ts b/test/features/multipart-form-data-fastify/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/multipart-form-data-fastify/src/test/index.ts +++ b/test/features/multipart-form-data-fastify/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/multipart-form-data/src/test/index.ts b/test/features/multipart-form-data/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/multipart-form-data/src/test/index.ts +++ b/test/features/multipart-form-data/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/non-equals/src/test/index.ts b/test/features/non-equals/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/non-equals/src/test/index.ts +++ b/test/features/non-equals/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/operationId/src/test/index.ts b/test/features/operationId/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/operationId/src/test/index.ts +++ b/test/features/operationId/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/param/src/test/index.ts b/test/features/param/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/param/src/test/index.ts +++ b/test/features/param/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/plain/src/test/index.ts b/test/features/plain/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/plain/src/test/index.ts +++ b/test/features/plain/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/propagate/src/test/index.ts b/test/features/propagate/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/propagate/src/test/index.ts +++ b/test/features/propagate/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/query-decompose-false/nestia.config.ts b/test/features/query-decompose-false/nestia.config.ts index e74a03fc4..a2b5dafab 100644 --- a/test/features/query-decompose-false/nestia.config.ts +++ b/test/features/query-decompose-false/nestia.config.ts @@ -5,6 +5,7 @@ export const NESTIA_CONFIG: INestiaConfig = { output: "src/api", swagger: { output: "swagger.json", + beautify: true, decompose: false, security: { bearer: { diff --git a/test/features/query-decompose-false/src/test/index.ts b/test/features/query-decompose-false/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/query-decompose-false/src/test/index.ts +++ b/test/features/query-decompose-false/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/query-decompose-false/swagger.json b/test/features/query-decompose-false/swagger.json index 4581667ab..0c76caaef 100644 --- a/test/features/query-decompose-false/swagger.json +++ b/test/features/query-decompose-false/swagger.json @@ -1 +1,235 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/IQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/INestQuery"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"query","in":"query","schema":{"$ref":"#/components/schemas/OmitIQueryatomic"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.6.0", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/query/typed": { + "get": { + "tags": [], + "parameters": [ + { + "name": "query", + "in": "query", + "schema": { + "$ref": "#/components/schemas/IQuery" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IQuery" + } + } + } + } + } + } + }, + "/query/nest": { + "get": { + "tags": [], + "parameters": [ + { + "name": "query", + "in": "query", + "schema": { + "$ref": "#/components/schemas/INestQuery" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IQuery" + } + } + } + } + } + } + }, + "/query/individual": { + "get": { + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/query/composite": { + "get": { + "tags": [], + "parameters": [ + { + "name": "atomic", + "in": "query", + "schema": { + "type": "string" + }, + "required": true + }, + { + "name": "query", + "in": "query", + "schema": { + "$ref": "#/components/schemas/OmitIQueryatomic" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IQuery" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "IQuery": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "enforce": { + "type": "boolean" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "atomic": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "enforce", + "values", + "atomic" + ] + }, + "INestQuery": { + "type": "object", + "properties": { + "limit": { + "type": "string", + "pattern": "^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$" + }, + "enforce": { + "oneOf": [ + { + "const": "false" + }, + { + "const": "true" + } + ] + }, + "atomic": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enforce", + "atomic", + "values" + ] + }, + "OmitIQueryatomic": { + "type": "object", + "properties": { + "limit": { + "type": "number" + }, + "enforce": { + "type": "boolean" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "enforce", + "values" + ], + "description": "Construct a type with the properties of T except for those in type K." + } + }, + "securitySchemes": { + "bearer": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file diff --git a/test/features/query-decompose-true/src/test/index.ts b/test/features/query-decompose-true/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/query-decompose-true/src/test/index.ts +++ b/test/features/query-decompose-true/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/query-decompose-true/swagger.json b/test/features/query-decompose-true/swagger.json index ba18172a0..6147f17d4 100644 --- a/test/features/query-decompose-true/swagger.json +++ b/test/features/query-decompose-true/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query/src/test/index.ts b/test/features/query/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/query/src/test/index.ts +++ b/test/features/query/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/query/swagger.json b/test/features/query/swagger.json index e4c604998..e38f54e85 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"a","in":"query","schema":{"type":"string"},"required":false},{"name":"b","in":"query","schema":{"type":"number"},"required":false},{"name":"c","in":"query","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"a","in":"query","schema":{"type":"string"},"required":false},{"name":"b","in":"query","schema":{"type":"number"},"required":false},{"name":"c","in":"query","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-invalid-path-error/src/test/index.ts b/test/features/route-invalid-path-error/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/route-invalid-path-error/src/test/index.ts +++ b/test/features/route-invalid-path-error/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/route-manual-assert/src/test/index.ts b/test/features/route-manual-assert/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/route-manual-assert/src/test/index.ts +++ b/test/features/route-manual-assert/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/route-manual-assert/swagger.json b/test/features/route-manual-assert/swagger.json index fc10e7bd3..36d60841c 100644 --- a/test/features/route-manual-assert/swagger.json +++ b/test/features/route-manual-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-is/src/test/index.ts b/test/features/route-manual-is/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/route-manual-is/src/test/index.ts +++ b/test/features/route-manual-is/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/route-manual-is/swagger.json b/test/features/route-manual-is/swagger.json index fc10e7bd3..36d60841c 100644 --- a/test/features/route-manual-is/swagger.json +++ b/test/features/route-manual-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-stringify/src/test/index.ts b/test/features/route-manual-stringify/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/route-manual-stringify/src/test/index.ts +++ b/test/features/route-manual-stringify/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/route-manual-stringify/swagger.json b/test/features/route-manual-stringify/swagger.json index fc10e7bd3..36d60841c 100644 --- a/test/features/route-manual-stringify/swagger.json +++ b/test/features/route-manual-stringify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-validate/src/test/index.ts b/test/features/route-manual-validate/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/route-manual-validate/src/test/index.ts +++ b/test/features/route-manual-validate/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/route-manual-validate/swagger.json b/test/features/route-manual-validate/swagger.json index fc10e7bd3..36d60841c 100644 --- a/test/features/route-manual-validate/swagger.json +++ b/test/features/route-manual-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route/src/test/index.ts b/test/features/route/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/route/src/test/index.ts +++ b/test/features/route/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/route/swagger.json b/test/features/route/swagger.json index fc10e7bd3..36d60841c 100644 --- a/test/features/route/swagger.json +++ b/test/features/route/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/security-error-not-found/src/test/index.ts b/test/features/security-error-not-found/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/security-error-not-found/src/test/index.ts +++ b/test/features/security-error-not-found/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/security-error-not-oauth2/src/test/index.ts b/test/features/security-error-not-oauth2/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/security-error-not-oauth2/src/test/index.ts +++ b/test/features/security-error-not-oauth2/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/security-error-out-of-scopes/src/test/index.ts b/test/features/security-error-out-of-scopes/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/security-error-out-of-scopes/src/test/index.ts +++ b/test/features/security-error-out-of-scopes/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/security/src/api/functional/index.ts b/test/features/security/src/api/functional/index.ts index 93e34cb71..f0be2efad 100644 --- a/test/features/security/src/api/functional/index.ts +++ b/test/features/security/src/api/functional/index.ts @@ -39,9 +39,7 @@ export namespace basic { } /** - * * @security basic - * * @controller SecurityController.basic_by_comment * @path GET /basic_by_comment * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -102,9 +100,7 @@ export namespace bearer { } /** - * * @security bearer - * * @controller SecurityController.bearer_by_comment * @path GET /bearer_by_comment * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -165,9 +161,7 @@ export namespace oauth2 { } /** - * * @security oauth2 write:pets read:pets - * * @controller SecurityController.oauth2_by_comment * @path GET /oauth2_by_comment * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -199,10 +193,8 @@ export namespace oauth2_by_comment { } /** - * * @security * @security bearer - * * @controller SecurityController.optional_by_comment * @path GET /optional_by_comment * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/security/src/test/index.ts b/test/features/security/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/security/src/test/index.ts +++ b/test/features/security/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/security/swagger.json b/test/features/security/swagger.json index 9e4d6289c..d8d9815e9 100644 --- a/test/features/security/swagger.json +++ b/test/features/security/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/basic":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/basic_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/bearer":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/bearer_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/oauth2":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/oauth2_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/optional_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{},{"bearer":[]}]}},"/security":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}}}}},"components":{"schemas":{"IToken":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"securitySchemes":{"basic":{"type":"http","scheme":"basic"},"bearer":{"type":"http","scheme":"bearer"},"oauth2":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"security":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"x1":"x1","x2":"x2"}}}}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/basic":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/basic_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/bearer":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/bearer_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/oauth2":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/oauth2_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/optional_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{},{"bearer":[]}]}},"/security":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}}}}},"components":{"schemas":{"IToken":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"securitySchemes":{"basic":{"type":"http","scheme":"basic"},"bearer":{"type":"http","scheme":"bearer"},"oauth2":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"security":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"x1":"x1","x2":"x2"}}}}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/simulate/src/api/functional/sellers/authenticate/index.ts b/test/features/simulate/src/api/functional/sellers/authenticate/index.ts index 400027e78..4961525ea 100644 --- a/test/features/simulate/src/api/functional/sellers/authenticate/index.ts +++ b/test/features/simulate/src/api/functional/sellers/authenticate/index.ts @@ -172,7 +172,6 @@ export namespace login { /** * Erase the seller by itself. - * * @controller SellerAuthenticateController.exit * @path DELETE /sellers/authenticate/exit * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/simulate/src/test/index.ts b/test/features/simulate/src/test/index.ts index da98db213..e2516c300 100644 --- a/test/features/simulate/src/test/index.ts +++ b/test/features/simulate/src/test/index.ts @@ -19,8 +19,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/simulate/swagger.json b/test/features/simulate/swagger.json index 19abb06f4..aac95e69b 100644 --- a/test/features/simulate/swagger.json +++ b/test/features/simulate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"Target article ID","required":true}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/first/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"description":"Target data","required":true}],"responses":{"200":{"description":"The first article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get first article of a day","description":"Get first article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/first/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"required":true,"description":" Target data"}],"responses":{"200":{"description":"The first article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get first article of a day","description":"Get first article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/status/src/test/index.ts b/test/features/status/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/status/src/test/index.ts +++ b/test/features/status/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/status/swagger.json b/test/features/status/swagger.json index a9b99548b..60fb5ed97 100644 --- a/test/features/status/swagger.json +++ b/test/features/status/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/status/random":{"get":{"tags":[],"parameters":[],"responses":{"300":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/status/random":{"get":{"tags":[],"parameters":[],"responses":{"300":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/swagger-customizer/src/test/index.ts b/test/features/swagger-customizer/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/swagger-customizer/src/test/index.ts +++ b/test/features/swagger-customizer/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/swagger-customizer/swagger.json b/test/features/swagger-customizer/swagger.json index a61adfae7..7d70d307b 100644 --- a/test/features/swagger-customizer/swagger.json +++ b/test/features/swagger-customizer/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.5.0", + "version": "3.6.0", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { @@ -25,7 +25,6 @@ "schema": { "type": "number" }, - "description": "", "required": true }, { @@ -34,7 +33,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], @@ -69,7 +67,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], diff --git "a/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" "b/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" index 526390c8f..0451fb9a7 100644 --- "a/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" +++ "b/test/features/swagger-\355\225\234\352\270\200\352\262\275\353\241\234/src/test/index.ts" @@ -23,8 +23,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/swagger/src/test/index.ts b/test/features/swagger/src/test/index.ts index 526390c8f..0451fb9a7 100644 --- a/test/features/swagger/src/test/index.ts +++ b/test/features/swagger/src/test/index.ts @@ -23,8 +23,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/tags/src/test/index.ts b/test/features/tags/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/tags/src/test/index.ts +++ b/test/features/tags/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/tags/swagger.json b/test/features/tags/swagger.json index e94cc2542..7542fc6e3 100644 --- a/test/features/tags/swagger.json +++ b/test/features/tags/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.5.0", + "version": "3.6.0", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { @@ -28,8 +28,8 @@ "schema": { "type": "string" }, - "description": "Section code", - "required": true + "required": true, + "description": " Section code" } ], "requestBody": { @@ -82,8 +82,8 @@ "schema": { "type": "string" }, - "description": "Section code", - "required": true + "required": true, + "description": " Section code" }, { "name": "id", @@ -92,8 +92,8 @@ "type": "string", "format": "uuid" }, - "description": "Target article ID", - "required": true + "required": true, + "description": " Target article ID" } ], "requestBody": { diff --git a/test/features/variable/src/test/index.ts b/test/features/variable/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/variable/src/test/index.ts +++ b/test/features/variable/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/variable/swagger.json b/test/features/variable/swagger.json index bcfaa0845..b7c119359 100644 --- a/test/features/variable/swagger.json +++ b/test/features/variable/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/package/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"Section code","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/package/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"description":"Target article ID","required":true}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."},"delete":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"responses":{"200":{"description":""}},"summary":"Delete an article","description":"Delete an article."}},"/bbs/package/{section}/articles/new/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"description":"Target data","required":true}],"responses":{"200":{"description":"The new article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get new article of a day","description":"Get new article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/package/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/package/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."},"delete":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":""}},"summary":"Delete an article","description":"Delete an article."}},"/bbs/package/{section}/articles/new/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"required":true,"description":" Target data"}],"responses":{"200":{"description":"The new article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get new article of a day","description":"Get new article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/websocket-clone/src/test/index.ts b/test/features/websocket-clone/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/websocket-clone/src/test/index.ts +++ b/test/features/websocket-clone/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/websocket-clone/swagger.json b/test/features/websocket-clone/swagger.json index 0b94f9773..d28d15f43 100644 --- a/test/features/websocket-clone/swagger.json +++ b/test/features/websocket-clone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/websocket/src/test/index.ts b/test/features/websocket/src/test/index.ts index 3fdf74090..7e8f43d54 100644 --- a/test/features/websocket/src/test/index.ts +++ b/test/features/websocket/src/test/index.ts @@ -21,8 +21,8 @@ async function main(): Promise { location: `${__dirname}/features`, onComplete: (exec) => { const elapsed: number = - new Date(exec.started_at).getTime() - - new Date(exec.completed_at).getTime(); + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); }, }); diff --git a/test/features/websocket/swagger.json b/test/features/websocket/swagger.json index 0b94f9773..d28d15f43 100644 --- a/test/features/websocket/swagger.json +++ b/test/features/websocket/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/package.json b/test/package.json index 03cd14786..b27c17625 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.6.0", + "version": "3.6.1", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.6.0", + "@nestia/sdk": "^3.6.1", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.4", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.6.0", + "@nestia/core": "^3.6.1", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.6.0", + "@nestia/fetcher": "^3.6.1", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From 4106018236aac9b1395ae651ea35343fc947b6cc Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Thu, 11 Jul 2024 22:39:58 +0900 Subject: [PATCH 019/204] Close #880: support multiple openapi versions generation. --- package.json | 2 +- packages/core/package.json | 6 +- packages/fetcher/package.json | 2 +- packages/sdk/package.json | 10 +- packages/sdk/src/INestiaConfig.ts | 12 ++ .../sdk/src/generates/SwaggerGenerator.ts | 15 +- test/features/openapi_v2/nestia.config.ts | 25 +++ test/features/openapi_v2/src/Backend.ts | 20 ++ test/features/openapi_v2/src/api/HttpError.ts | 1 + .../openapi_v2/src/api/IConnection.ts | 1 + test/features/openapi_v2/src/api/Primitive.ts | 1 + .../api/functional/articles/comments/index.ts | 204 ++++++++++++++++++ .../src/api/functional/articles/index.ts | 7 + .../src/api/functional/bbs/articles/index.ts | 201 +++++++++++++++++ .../src/api/functional/bbs/index.ts | 7 + .../src/api/functional/health/index.ts | 35 +++ .../openapi_v2/src/api/functional/index.ts | 10 + .../src/api/functional/performance/index.ts | 39 ++++ test/features/openapi_v2/src/api/index.ts | 4 + test/features/openapi_v2/src/api/module.ts | 5 + .../src/api/structures/IAttachmentFile.ts | 7 + .../src/api/structures/IBbsArticle.ts | 24 +++ .../src/api/structures/IBbsComment.ts | 14 ++ .../openapi_v2/src/api/structures/IPage.ts | 45 ++++ .../src/api/structures/IPerformance.ts | 10 + .../openapi_v2/src/api/structures/ISystem.ts | 81 +++++++ .../src/controllers/BbsArticlesController.ts | 85 ++++++++ .../src/controllers/BbsCommentsController.ts | 59 +++++ .../src/controllers/HealthController.ts | 8 + .../src/controllers/PerformanceController.ts | 16 ++ .../src/modules/ApplicationModule.ts | 9 + .../openapi_v2/src/modules/BbsModule.ts | 9 + .../openapi_v2/src/modules/CommonModule.ts | 9 + .../openapi_v2/src/modules/HealthModule.ts | 8 + .../src/modules/PerformanceModule.ts | 8 + .../src/test/features/test_openapi_v2.ts | 8 + test/features/openapi_v2/src/test/index.ts | 47 ++++ test/features/openapi_v2/swagger.json | 1 + test/features/openapi_v2/tsconfig.json | 98 +++++++++ test/features/openapi_v3/nestia.config.ts | 25 +++ test/features/openapi_v3/src/Backend.ts | 20 ++ test/features/openapi_v3/src/api/HttpError.ts | 1 + .../openapi_v3/src/api/IConnection.ts | 1 + test/features/openapi_v3/src/api/Primitive.ts | 1 + .../api/functional/articles/comments/index.ts | 204 ++++++++++++++++++ .../src/api/functional/articles/index.ts | 7 + .../src/api/functional/bbs/articles/index.ts | 201 +++++++++++++++++ .../src/api/functional/bbs/index.ts | 7 + .../src/api/functional/health/index.ts | 35 +++ .../openapi_v3/src/api/functional/index.ts | 10 + .../src/api/functional/performance/index.ts | 39 ++++ test/features/openapi_v3/src/api/index.ts | 4 + test/features/openapi_v3/src/api/module.ts | 5 + .../src/api/structures/IAttachmentFile.ts | 7 + .../src/api/structures/IBbsArticle.ts | 24 +++ .../src/api/structures/IBbsComment.ts | 14 ++ .../openapi_v3/src/api/structures/IPage.ts | 45 ++++ .../src/api/structures/IPerformance.ts | 10 + .../openapi_v3/src/api/structures/ISystem.ts | 81 +++++++ .../src/controllers/BbsArticlesController.ts | 85 ++++++++ .../src/controllers/BbsCommentsController.ts | 59 +++++ .../src/controllers/HealthController.ts | 8 + .../src/controllers/PerformanceController.ts | 16 ++ .../src/modules/ApplicationModule.ts | 9 + .../openapi_v3/src/modules/BbsModule.ts | 9 + .../openapi_v3/src/modules/CommonModule.ts | 9 + .../openapi_v3/src/modules/HealthModule.ts | 8 + .../src/modules/PerformanceModule.ts | 8 + .../src/test/features/test_openapi_v3.ts | 8 + test/features/openapi_v3/src/test/index.ts | 47 ++++ test/features/openapi_v3/swagger.json | 1 + test/features/openapi_v3/tsconfig.json | 98 +++++++++ test/package.json | 8 +- 73 files changed, 2250 insertions(+), 17 deletions(-) create mode 100644 test/features/openapi_v2/nestia.config.ts create mode 100644 test/features/openapi_v2/src/Backend.ts create mode 100644 test/features/openapi_v2/src/api/HttpError.ts create mode 100644 test/features/openapi_v2/src/api/IConnection.ts create mode 100644 test/features/openapi_v2/src/api/Primitive.ts create mode 100644 test/features/openapi_v2/src/api/functional/articles/comments/index.ts create mode 100644 test/features/openapi_v2/src/api/functional/articles/index.ts create mode 100644 test/features/openapi_v2/src/api/functional/bbs/articles/index.ts create mode 100644 test/features/openapi_v2/src/api/functional/bbs/index.ts create mode 100644 test/features/openapi_v2/src/api/functional/health/index.ts create mode 100644 test/features/openapi_v2/src/api/functional/index.ts create mode 100644 test/features/openapi_v2/src/api/functional/performance/index.ts create mode 100644 test/features/openapi_v2/src/api/index.ts create mode 100644 test/features/openapi_v2/src/api/module.ts create mode 100644 test/features/openapi_v2/src/api/structures/IAttachmentFile.ts create mode 100644 test/features/openapi_v2/src/api/structures/IBbsArticle.ts create mode 100644 test/features/openapi_v2/src/api/structures/IBbsComment.ts create mode 100644 test/features/openapi_v2/src/api/structures/IPage.ts create mode 100644 test/features/openapi_v2/src/api/structures/IPerformance.ts create mode 100644 test/features/openapi_v2/src/api/structures/ISystem.ts create mode 100644 test/features/openapi_v2/src/controllers/BbsArticlesController.ts create mode 100644 test/features/openapi_v2/src/controllers/BbsCommentsController.ts create mode 100644 test/features/openapi_v2/src/controllers/HealthController.ts create mode 100644 test/features/openapi_v2/src/controllers/PerformanceController.ts create mode 100644 test/features/openapi_v2/src/modules/ApplicationModule.ts create mode 100644 test/features/openapi_v2/src/modules/BbsModule.ts create mode 100644 test/features/openapi_v2/src/modules/CommonModule.ts create mode 100644 test/features/openapi_v2/src/modules/HealthModule.ts create mode 100644 test/features/openapi_v2/src/modules/PerformanceModule.ts create mode 100644 test/features/openapi_v2/src/test/features/test_openapi_v2.ts create mode 100644 test/features/openapi_v2/src/test/index.ts create mode 100644 test/features/openapi_v2/swagger.json create mode 100644 test/features/openapi_v2/tsconfig.json create mode 100644 test/features/openapi_v3/nestia.config.ts create mode 100644 test/features/openapi_v3/src/Backend.ts create mode 100644 test/features/openapi_v3/src/api/HttpError.ts create mode 100644 test/features/openapi_v3/src/api/IConnection.ts create mode 100644 test/features/openapi_v3/src/api/Primitive.ts create mode 100644 test/features/openapi_v3/src/api/functional/articles/comments/index.ts create mode 100644 test/features/openapi_v3/src/api/functional/articles/index.ts create mode 100644 test/features/openapi_v3/src/api/functional/bbs/articles/index.ts create mode 100644 test/features/openapi_v3/src/api/functional/bbs/index.ts create mode 100644 test/features/openapi_v3/src/api/functional/health/index.ts create mode 100644 test/features/openapi_v3/src/api/functional/index.ts create mode 100644 test/features/openapi_v3/src/api/functional/performance/index.ts create mode 100644 test/features/openapi_v3/src/api/index.ts create mode 100644 test/features/openapi_v3/src/api/module.ts create mode 100644 test/features/openapi_v3/src/api/structures/IAttachmentFile.ts create mode 100644 test/features/openapi_v3/src/api/structures/IBbsArticle.ts create mode 100644 test/features/openapi_v3/src/api/structures/IBbsComment.ts create mode 100644 test/features/openapi_v3/src/api/structures/IPage.ts create mode 100644 test/features/openapi_v3/src/api/structures/IPerformance.ts create mode 100644 test/features/openapi_v3/src/api/structures/ISystem.ts create mode 100644 test/features/openapi_v3/src/controllers/BbsArticlesController.ts create mode 100644 test/features/openapi_v3/src/controllers/BbsCommentsController.ts create mode 100644 test/features/openapi_v3/src/controllers/HealthController.ts create mode 100644 test/features/openapi_v3/src/controllers/PerformanceController.ts create mode 100644 test/features/openapi_v3/src/modules/ApplicationModule.ts create mode 100644 test/features/openapi_v3/src/modules/BbsModule.ts create mode 100644 test/features/openapi_v3/src/modules/CommonModule.ts create mode 100644 test/features/openapi_v3/src/modules/HealthModule.ts create mode 100644 test/features/openapi_v3/src/modules/PerformanceModule.ts create mode 100644 test/features/openapi_v3/src/test/features/test_openapi_v3.ts create mode 100644 test/features/openapi_v3/src/test/index.ts create mode 100644 test/features/openapi_v3/swagger.json create mode 100644 test/features/openapi_v3/tsconfig.json diff --git a/package.json b/package.json index 34cd61a60..95747d85b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.6.1", + "version": "3.7.0-dev.20240711", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index 2739f3dc8..a31ce9903 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.6.1", + "version": "3.7.0-dev.20240711", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.6.1", + "@nestia/fetcher": "^3.7.0-dev.20240711", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.4", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.6.1", + "@nestia/fetcher": ">=3.7.0-dev.20240711", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index e13d971d2..a4e969731 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.6.1", + "version": "3.7.0-dev.20240711", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index ec818c143..84d1b7169 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.6.1", + "version": "3.7.0-dev.20240711", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.6.1", - "@nestia/core": "^3.6.1", + "@nestia/fetcher": "^3.7.0-dev.20240711", + "@nestia/core": "^3.7.0-dev.20240711", "@samchon/openapi": "^0.3.4", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.4.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.6.1", - "@nestia/core": ">=3.6.1", + "@nestia/fetcher": ">=3.7.0-dev.20240711", + "@nestia/core": ">=3.7.0-dev.20240711", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/INestiaConfig.ts b/packages/sdk/src/INestiaConfig.ts index be3aa1887..3f39dc76b 100644 --- a/packages/sdk/src/INestiaConfig.ts +++ b/packages/sdk/src/INestiaConfig.ts @@ -173,6 +173,18 @@ export namespace INestiaConfig { */ output: string; + /** + * OpenAPI version. + * + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. + * + * @default 3.1 + */ + openapi?: "2.0" | "3.0" | "3.1"; + /** * Whether to beautify JSON content or not. * diff --git a/packages/sdk/src/generates/SwaggerGenerator.ts b/packages/sdk/src/generates/SwaggerGenerator.ts index 8450a93ca..09bdc059c 100644 --- a/packages/sdk/src/generates/SwaggerGenerator.ts +++ b/packages/sdk/src/generates/SwaggerGenerator.ts @@ -1,4 +1,4 @@ -import { OpenApi } from "@samchon/openapi"; +import { OpenApi, OpenApiV3, SwaggerV2 } from "@samchon/openapi"; import fs from "fs"; import path from "path"; import { Singleton } from "tstl"; @@ -208,12 +208,21 @@ export namespace SwaggerGenerator { } // DO GENERATE + const document: + | OpenApi.IDocument + | SwaggerV2.IDocument + | OpenApiV3.IDocument = + config.openapi === "2.0" + ? OpenApi.downgrade(swagger, config.openapi as "2.0") + : config.openapi === "3.0" + ? OpenApi.downgrade(swagger, config.openapi as "3.0") + : swagger; await fs.promises.writeFile( location, !config.beautify - ? JSON.stringify(swagger) + ? JSON.stringify(document) : JSON.stringify( - swagger, + document, null, typeof config.beautify === "number" ? config.beautify : 2, ), diff --git a/test/features/openapi_v2/nestia.config.ts b/test/features/openapi_v2/nestia.config.ts new file mode 100644 index 000000000..79514f9b0 --- /dev/null +++ b/test/features/openapi_v2/nestia.config.ts @@ -0,0 +1,25 @@ +import { INestiaConfig } from "@nestia/sdk"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +import { ApplicationModule } from "./src/modules/ApplicationModule"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: async () => { + const app: INestApplication = await NestFactory.create(ApplicationModule, { + logger: false, + }); + return app; + }, + output: "src/api", + swagger: { + output: "swagger.json", + openapi: "2.0", + security: { + bearer: { + type: "apiKey", + }, + }, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/openapi_v2/src/Backend.ts b/test/features/openapi_v2/src/Backend.ts new file mode 100644 index 000000000..3824d52dc --- /dev/null +++ b/test/features/openapi_v2/src/Backend.ts @@ -0,0 +1,20 @@ +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; +import { Singleton } from "tstl"; + +import { ApplicationModule } from "./modules/ApplicationModule"; + +export class Backend { + public readonly application: Singleton> = + new Singleton(() => + NestFactory.create(ApplicationModule, { logger: false }), + ); + + public async open(): Promise { + return (await this.application.get()).listen(37_000); + } + + public async close(): Promise { + return (await this.application.get()).close(); + } +} diff --git a/test/features/openapi_v2/src/api/HttpError.ts b/test/features/openapi_v2/src/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/test/features/openapi_v2/src/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/test/features/openapi_v2/src/api/IConnection.ts b/test/features/openapi_v2/src/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/test/features/openapi_v2/src/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/test/features/openapi_v2/src/api/Primitive.ts b/test/features/openapi_v2/src/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/test/features/openapi_v2/src/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/test/features/openapi_v2/src/api/functional/articles/comments/index.ts b/test/features/openapi_v2/src/api/functional/articles/comments/index.ts new file mode 100644 index 000000000..1fc0a9721 --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/articles/comments/index.ts @@ -0,0 +1,204 @@ +/** + * @packageDocumentation + * @module api.functional.articles.comments + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Resolved, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; +import type { Format } from "typia/lib/tags/Format"; + +import type { IBbsComment } from "../../../structures/IBbsComment"; +import type { IPage } from "../../../structures/IPage"; + +/** + * @controller BbsCommentsController.index + * @path GET /:section/articles/:articleId/comments + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function index( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + query: index.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...index.METADATA, + template: index.METADATA.path, + path: index.path(section, articleId, query), + }); +} +export namespace index { + export type Query = Resolved; + export type Output = Primitive>; + + export const METADATA = { + method: "GET", + path: "/:section/articles/:articleId/comments", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = ( + section: string, + articleId: string & Format<"uuid">, + query: index.Query, + ) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments`; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller BbsCommentsController.at + * @path GET /:section/articles/:articleId/comments/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function at( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, +): Promise { + return PlainFetcher.fetch(connection, { + ...at.METADATA, + template: at.METADATA.path, + path: at.path(section, articleId, id), + }); +} +export namespace at { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/:section/articles/:articleId/comments/:id", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = ( + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, + ) => + `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments/${encodeURIComponent(id ?? "null")}`; +} + +/** + * @controller BbsCommentsController.store + * @path POST /:section/articles/:articleId/comments + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function store( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + input: store.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...store.METADATA, + template: store.METADATA.path, + path: store.path(section, articleId), + }, + input, + ); +} +export namespace store { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/:section/articles/:articleId/comments", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, articleId: string & Format<"uuid">) => + `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments`; +} + +/** + * @controller BbsCommentsController.update + * @path PUT /:section/articles/:articleId/comments/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function update( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, + input: update.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...update.METADATA, + template: update.METADATA.path, + path: update.path(section, articleId, id), + }, + input, + ); +} +export namespace update { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "PUT", + path: "/:section/articles/:articleId/comments/:id", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = ( + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, + ) => + `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments/${encodeURIComponent(id ?? "null")}`; +} diff --git a/test/features/openapi_v2/src/api/functional/articles/index.ts b/test/features/openapi_v2/src/api/functional/articles/index.ts new file mode 100644 index 000000000..32910012d --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/articles/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as comments from "./comments"; diff --git a/test/features/openapi_v2/src/api/functional/bbs/articles/index.ts b/test/features/openapi_v2/src/api/functional/bbs/articles/index.ts new file mode 100644 index 000000000..5efa486fc --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/bbs/articles/index.ts @@ -0,0 +1,201 @@ +/** + * @packageDocumentation + * @module api.functional.bbs.articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Resolved, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; +import type { Format } from "typia/lib/tags/Format"; + +import type { IBbsArticle } from "../../../structures/IBbsArticle"; +import type { IPage } from "../../../structures/IPage"; + +/** + * @controller BbsArticlesController.index + * @path GET /bbs/:section/articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function index( + connection: IConnection, + section: string, + query: index.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...index.METADATA, + template: index.METADATA.path, + path: index.path(section, query), + }); +} +export namespace index { + export type Query = Resolved; + export type Output = Primitive>; + + export const METADATA = { + method: "GET", + path: "/bbs/:section/articles", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, query: index.Query) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = `/bbs/${encodeURIComponent(section ?? "null")}/articles`; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller BbsArticlesController.at + * @path GET /bbs/:section/articles/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function at( + connection: IConnection, + section: string, + id: string & Format<"uuid">, +): Promise { + return PlainFetcher.fetch(connection, { + ...at.METADATA, + template: at.METADATA.path, + path: at.path(section, id), + }); +} +export namespace at { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/bbs/:section/articles/:id", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, id: string & Format<"uuid">) => + `/bbs/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(id ?? "null")}`; +} + +/** + * Store a new article. + * + * @param section Section code + * @param input Content to store + * @returns Newly archived article + * + * @controller BbsArticlesController.store + * @path POST /bbs/:section/articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function store( + connection: IConnection, + section: string, + input: store.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...store.METADATA, + template: store.METADATA.path, + path: store.path(section), + }, + input, + ); +} +export namespace store { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/bbs/:section/articles", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string) => + `/bbs/${encodeURIComponent(section ?? "null")}/articles`; +} + +/** + * Update an article. + * + * @param section Section code + * @param id Target article ID + * @param input Content to update + * @returns Updated content + * + * @controller BbsArticlesController.update + * @path PUT /bbs/:section/articles/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function update( + connection: IConnection, + section: string, + id: string & Format<"uuid">, + input: update.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...update.METADATA, + template: update.METADATA.path, + path: update.path(section, id), + }, + input, + ); +} +export namespace update { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "PUT", + path: "/bbs/:section/articles/:id", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, id: string & Format<"uuid">) => + `/bbs/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(id ?? "null")}`; +} diff --git a/test/features/openapi_v2/src/api/functional/bbs/index.ts b/test/features/openapi_v2/src/api/functional/bbs/index.ts new file mode 100644 index 000000000..7a891f888 --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/bbs/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.bbs + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as articles from "./articles"; diff --git a/test/features/openapi_v2/src/api/functional/health/index.ts b/test/features/openapi_v2/src/api/functional/health/index.ts new file mode 100644 index 000000000..d5a9f9925 --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/health/index.ts @@ -0,0 +1,35 @@ +/** + * @packageDocumentation + * @module api.functional.health + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +/** + * @controller HealthController.get + * @path GET /health + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function get(connection: IConnection): Promise { + return PlainFetcher.fetch(connection, { + ...get.METADATA, + template: get.METADATA.path, + path: get.path(), + }); +} +export namespace get { + export const METADATA = { + method: "GET", + path: "/health", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/health"; +} diff --git a/test/features/openapi_v2/src/api/functional/index.ts b/test/features/openapi_v2/src/api/functional/index.ts new file mode 100644 index 000000000..a11a25ddb --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/index.ts @@ -0,0 +1,10 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as health from "./health"; +export * as performance from "./performance"; +export * as bbs from "./bbs"; +export * as articles from "./articles"; diff --git a/test/features/openapi_v2/src/api/functional/performance/index.ts b/test/features/openapi_v2/src/api/functional/performance/index.ts new file mode 100644 index 000000000..2e71dbb40 --- /dev/null +++ b/test/features/openapi_v2/src/api/functional/performance/index.ts @@ -0,0 +1,39 @@ +/** + * @packageDocumentation + * @module api.functional.performance + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +import type { IPerformance } from "../../structures/IPerformance"; + +/** + * @controller PerformanceController.get + * @path GET /performance + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function get(connection: IConnection): Promise { + return PlainFetcher.fetch(connection, { + ...get.METADATA, + template: get.METADATA.path, + path: get.path(), + }); +} +export namespace get { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/performance", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/performance"; +} diff --git a/test/features/openapi_v2/src/api/index.ts b/test/features/openapi_v2/src/api/index.ts new file mode 100644 index 000000000..1705f43c8 --- /dev/null +++ b/test/features/openapi_v2/src/api/index.ts @@ -0,0 +1,4 @@ +import * as api from "./module"; + +export * from "./module"; +export default api; diff --git a/test/features/openapi_v2/src/api/module.ts b/test/features/openapi_v2/src/api/module.ts new file mode 100644 index 000000000..dbb6e9a51 --- /dev/null +++ b/test/features/openapi_v2/src/api/module.ts @@ -0,0 +1,5 @@ +export type * from "./IConnection"; +export type * from "./Primitive"; +export * from "./HttpError"; + +export * as functional from "./functional"; diff --git a/test/features/openapi_v2/src/api/structures/IAttachmentFile.ts b/test/features/openapi_v2/src/api/structures/IAttachmentFile.ts new file mode 100644 index 000000000..12c49ef32 --- /dev/null +++ b/test/features/openapi_v2/src/api/structures/IAttachmentFile.ts @@ -0,0 +1,7 @@ +import { tags } from "typia"; + +export interface IAttachmentFile { + name: null | (string & tags.MinLength<1> & tags.MaxLength<255>); + extension: null | (string & tags.MinLength<1> & tags.MaxLength<8>); + url: null | (string & tags.Format<"uri">); +} diff --git a/test/features/openapi_v2/src/api/structures/IBbsArticle.ts b/test/features/openapi_v2/src/api/structures/IBbsArticle.ts new file mode 100644 index 000000000..d81ff9407 --- /dev/null +++ b/test/features/openapi_v2/src/api/structures/IBbsArticle.ts @@ -0,0 +1,24 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; + +export interface IBbsArticle extends IBbsArticle.IStore { + id: string & tags.Format<"uuid">; + section: string; + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsArticle { + export interface IStore { + title: string & tags.MinLength<3> & tags.MaxLength<50>; + body: string; + files: IAttachmentFile[]; + } + + export interface ISummary { + id: string & tags.Format<"uuid">; + section: string; + writer: string; + title: string & tags.MinLength<3> & tags.MaxLength<50>; + created_at: string & tags.Format<"date-time">; + } +} diff --git a/test/features/openapi_v2/src/api/structures/IBbsComment.ts b/test/features/openapi_v2/src/api/structures/IBbsComment.ts new file mode 100644 index 000000000..a60d2f775 --- /dev/null +++ b/test/features/openapi_v2/src/api/structures/IBbsComment.ts @@ -0,0 +1,14 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; + +export interface IBbsComment extends IBbsComment.IStore { + id: string & tags.Format<"uuid">; + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsComment { + export interface IStore { + body: string; + files: IAttachmentFile[]; + } +} diff --git a/test/features/openapi_v2/src/api/structures/IPage.ts b/test/features/openapi_v2/src/api/structures/IPage.ts new file mode 100644 index 000000000..11d6649df --- /dev/null +++ b/test/features/openapi_v2/src/api/structures/IPage.ts @@ -0,0 +1,45 @@ +export interface IPage { + data: T[]; + pagination: IPage.IPagination; +} +export namespace IPage { + /** + * Page request data + */ + export interface IRequest { + /** + * @type uint + */ + page?: number | null; + + /** + * @type uint + */ + limit?: number | null; + } + + /** + * Page information. + */ + export interface IPagination { + /** + * @type uint + */ + current: number; + + /** + * @type uint + */ + limit: number; + + /** + * @type uint + */ + records: number; + + /** + * @type uint + */ + pages: number; + } +} diff --git a/test/features/openapi_v2/src/api/structures/IPerformance.ts b/test/features/openapi_v2/src/api/structures/IPerformance.ts new file mode 100644 index 000000000..22b8f2840 --- /dev/null +++ b/test/features/openapi_v2/src/api/structures/IPerformance.ts @@ -0,0 +1,10 @@ +/** + * Performance info. + * + * @author Samchon + */ +export interface IPerformance { + cpu: NodeJS.CpuUsage; + memory: NodeJS.MemoryUsage; + resource: NodeJS.ResourceUsage; +} diff --git a/test/features/openapi_v2/src/api/structures/ISystem.ts b/test/features/openapi_v2/src/api/structures/ISystem.ts new file mode 100644 index 000000000..0e135bede --- /dev/null +++ b/test/features/openapi_v2/src/api/structures/ISystem.ts @@ -0,0 +1,81 @@ +/** + * System Information. + * + * @author Jeongho Nam + */ +export interface ISystem { + /** + * Random Unique ID. + */ + uid: number; + + /** + * `process.argv` + */ + arguments: string[]; + + /** + * Git commit info. + */ + commit: ISystem.ICommit; + + /** + * `package.json` + */ + package: ISystem.IPackage; + + /** + * Creation time of this server. + */ + created_at: string; +} + +export namespace ISystem { + /** + * Git commit info. + */ + export interface ICommit { + shortHash: string; + branch: string; + hash: string; + subject: string; + sanitizedSubject: string; + body: string; + author: ICommit.IUser; + committer: ICommit.IUser; + authored_at: string; + commited_at: string; + notes?: string; + tags: string[]; + } + export namespace ICommit { + /** + * Git user account info. + */ + export interface IUser { + name: string; + email: string; + } + } + + /** + * NPM package info. + */ + export interface IPackage { + name: string; + version: string; + description: string; + main?: string; + typings?: string; + scripts: Record; + repository: { type: "git"; url: string }; + author: string; + license: string; + bugs: { url: string }; + homepage: string; + devDependencies?: Record; + dependencies: Record; + publishConfig?: { registry: string }; + files?: string[]; + } +} diff --git a/test/features/openapi_v2/src/controllers/BbsArticlesController.ts b/test/features/openapi_v2/src/controllers/BbsArticlesController.ts new file mode 100644 index 000000000..1f7e2aacb --- /dev/null +++ b/test/features/openapi_v2/src/controllers/BbsArticlesController.ts @@ -0,0 +1,85 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller("bbs/:section/articles") +export class BbsArticlesController { + @core.TypedRoute.Get() + public async index( + @core.TypedParam("section") section: string, + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + const limit: number = query.limit ?? 100; + const current: number = query.page ?? 1; + const records: number = limit * (current + 3) + 5; + + return { + pagination: { + current, + limit, + records, + pages: Math.ceil(records / limit), + }, + data: new Array(limit).fill("").map(() => ({ + ...typia.random(), + section, + })), + }; + } + + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("section") section: string, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + return { + ...typia.random(), + id, + section, + }; + } + + /** + * Store a new article. + * + * @param section Section code + * @param input Content to store + * @returns Newly archived article + */ + @core.TypedRoute.Post() + public async store( + @core.TypedParam("section") section: string, + @core.TypedBody() input: IBbsArticle.IStore, + ): Promise { + return { + ...typia.random(), + section, + ...input, + }; + } + + /** + * Update an article. + * + * @param section Section code + * @param id Target article ID + * @param input Content to update + * @returns Updated content + */ + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("section") section: string, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IStore, + ): Promise { + return { + ...typia.random(), + id, + section, + ...input, + }; + } +} diff --git a/test/features/openapi_v2/src/controllers/BbsCommentsController.ts b/test/features/openapi_v2/src/controllers/BbsCommentsController.ts new file mode 100644 index 000000000..be32d656e --- /dev/null +++ b/test/features/openapi_v2/src/controllers/BbsCommentsController.ts @@ -0,0 +1,59 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import typia, { tags } from "typia"; + +import { IBbsComment } from "@api/lib/structures/IBbsComment"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller(":section/articles/:articleId/comments") +export class BbsCommentsController { + @core.TypedRoute.Get() + public async index( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + section; + articleId; + query; + return typia.random>(); + } + + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + section; + articleId; + id; + return typia.random(); + } + + @core.TypedRoute.Post() + public async store( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsComment.IStore, + ): Promise { + section; + articleId; + input; + return typia.random(); + } + + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsComment.IStore, + ): Promise { + section; + articleId; + id; + input; + return typia.random(); + } +} diff --git a/test/features/openapi_v2/src/controllers/HealthController.ts b/test/features/openapi_v2/src/controllers/HealthController.ts new file mode 100644 index 000000000..f7e06aef4 --- /dev/null +++ b/test/features/openapi_v2/src/controllers/HealthController.ts @@ -0,0 +1,8 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; + +@Controller("health") +export class HealthController { + @core.TypedRoute.Get() + public get(): void {} +} diff --git a/test/features/openapi_v2/src/controllers/PerformanceController.ts b/test/features/openapi_v2/src/controllers/PerformanceController.ts new file mode 100644 index 000000000..616548cf8 --- /dev/null +++ b/test/features/openapi_v2/src/controllers/PerformanceController.ts @@ -0,0 +1,16 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; + +import { IPerformance } from "@api/lib/structures/IPerformance"; + +@Controller("performance") +export class PerformanceController { + @core.TypedRoute.Get() + public async get(): Promise { + return { + cpu: process.cpuUsage(), + memory: process.memoryUsage(), + resource: process.resourceUsage(), + }; + } +} diff --git a/test/features/openapi_v2/src/modules/ApplicationModule.ts b/test/features/openapi_v2/src/modules/ApplicationModule.ts new file mode 100644 index 000000000..ca207b7e6 --- /dev/null +++ b/test/features/openapi_v2/src/modules/ApplicationModule.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; + +import { BbsModule } from "./BbsModule"; +import { CommonModule } from "./CommonModule"; + +@Module({ + imports: [CommonModule, BbsModule], +}) +export class ApplicationModule {} diff --git a/test/features/openapi_v2/src/modules/BbsModule.ts b/test/features/openapi_v2/src/modules/BbsModule.ts new file mode 100644 index 000000000..0b20a1419 --- /dev/null +++ b/test/features/openapi_v2/src/modules/BbsModule.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; + +import { BbsArticlesController } from "../controllers/BbsArticlesController"; +import { BbsCommentsController } from "../controllers/BbsCommentsController"; + +@Module({ + controllers: [BbsArticlesController, BbsCommentsController], +}) +export class BbsModule {} diff --git a/test/features/openapi_v2/src/modules/CommonModule.ts b/test/features/openapi_v2/src/modules/CommonModule.ts new file mode 100644 index 000000000..5d2c14f83 --- /dev/null +++ b/test/features/openapi_v2/src/modules/CommonModule.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; + +import { HealthModule } from "./HealthModule"; +import { PerformanceModule } from "./PerformanceModule"; + +@Module({ + imports: [HealthModule, PerformanceModule], +}) +export class CommonModule {} diff --git a/test/features/openapi_v2/src/modules/HealthModule.ts b/test/features/openapi_v2/src/modules/HealthModule.ts new file mode 100644 index 000000000..76493d003 --- /dev/null +++ b/test/features/openapi_v2/src/modules/HealthModule.ts @@ -0,0 +1,8 @@ +import { Module } from "@nestjs/common"; + +import { HealthController } from "../controllers/HealthController"; + +@Module({ + controllers: [HealthController], +}) +export class HealthModule {} diff --git a/test/features/openapi_v2/src/modules/PerformanceModule.ts b/test/features/openapi_v2/src/modules/PerformanceModule.ts new file mode 100644 index 000000000..295714dc1 --- /dev/null +++ b/test/features/openapi_v2/src/modules/PerformanceModule.ts @@ -0,0 +1,8 @@ +import { Module } from "@nestjs/common"; + +import { PerformanceController } from "../controllers/PerformanceController"; + +@Module({ + controllers: [PerformanceController], +}) +export class PerformanceModule {} diff --git a/test/features/openapi_v2/src/test/features/test_openapi_v2.ts b/test/features/openapi_v2/src/test/features/test_openapi_v2.ts new file mode 100644 index 000000000..d81f7a7b8 --- /dev/null +++ b/test/features/openapi_v2/src/test/features/test_openapi_v2.ts @@ -0,0 +1,8 @@ +import { SwaggerV2 } from "@samchon/openapi"; +import typia from "typia"; + +import swagger from "../../../swagger.json"; + +export const test_openapi_v2 = (): void => { + typia.assert(swagger); +} \ No newline at end of file diff --git a/test/features/openapi_v2/src/test/index.ts b/test/features/openapi_v2/src/test/index.ts new file mode 100644 index 000000000..7e8f43d54 --- /dev/null +++ b/test/features/openapi_v2/src/test/index.ts @@ -0,0 +1,47 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); + await server.close(); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/openapi_v2/swagger.json b/test/features/openapi_v2/swagger.json new file mode 100644 index 000000000..5ec351f5d --- /dev/null +++ b/test/features/openapi_v2/swagger.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"version":"3.6.1","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"host":"github.com/samchon/nestia","definitions":{"schemas":{},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/definitions/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/definitions/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/definitions/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"type":"integer","x-nullable":true},"limit":{"type":"integer","x-nullable":true}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/definitions/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"x-nullable":true},"extension":{"type":"string","minLength":1,"maxLength":8,"x-nullable":true},"url":{"type":"string","format":"uri","x-nullable":true}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/IBbsComment"}},"pagination":{"$ref":"#/definitions/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["body","files"]}},"securityDefinitions":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","schema":{}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPerformance"}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"integer","x-nullable":true,"name":"page","in":"query"},{"type":"integer","x-nullable":true,"name":"limit","in":"query"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPageIBbsArticle.ISummary"}}}},"post":{"tags":[],"parameters":[{"type":"string","description":" Section code","name":"section","in":"path"},{"name":"body","in":"body","description":"Content to store","required":true,"schema":{"$ref":"#/definitions/IBbsArticle.IStore"}}],"responses":{"201":{"description":"Newly archived article","schema":{"$ref":"#/definitions/IBbsArticle"}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsArticle"}}}},"put":{"tags":[],"parameters":[{"type":"string","description":" Section code","name":"section","in":"path"},{"type":"string","format":"uuid","description":" Target article ID","name":"id","in":"path"},{"name":"body","in":"body","description":"Content to update","required":true,"schema":{"$ref":"#/definitions/IBbsArticle.IStore"}}],"responses":{"200":{"description":"Updated content","schema":{"$ref":"#/definitions/IBbsArticle"}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"integer","x-nullable":true,"name":"page","in":"query"},{"type":"integer","x-nullable":true,"name":"limit","in":"query"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPageIBbsComment"}}}},"post":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/IBbsComment.IStore"}}],"responses":{"201":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}},"put":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/IBbsComment.IStore"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}}}},"tags":[]} \ No newline at end of file diff --git a/test/features/openapi_v2/tsconfig.json b/test/features/openapi_v2/tsconfig.json new file mode 100644 index 000000000..ef75df78e --- /dev/null +++ b/test/features/openapi_v2/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + } + } \ No newline at end of file diff --git a/test/features/openapi_v3/nestia.config.ts b/test/features/openapi_v3/nestia.config.ts new file mode 100644 index 000000000..ff4149641 --- /dev/null +++ b/test/features/openapi_v3/nestia.config.ts @@ -0,0 +1,25 @@ +import { INestiaConfig } from "@nestia/sdk"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +import { ApplicationModule } from "./src/modules/ApplicationModule"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: async () => { + const app: INestApplication = await NestFactory.create(ApplicationModule, { + logger: false, + }); + return app; + }, + output: "src/api", + swagger: { + output: "swagger.json", + openapi: "3.0", + security: { + bearer: { + type: "apiKey", + }, + }, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/openapi_v3/src/Backend.ts b/test/features/openapi_v3/src/Backend.ts new file mode 100644 index 000000000..3824d52dc --- /dev/null +++ b/test/features/openapi_v3/src/Backend.ts @@ -0,0 +1,20 @@ +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; +import { Singleton } from "tstl"; + +import { ApplicationModule } from "./modules/ApplicationModule"; + +export class Backend { + public readonly application: Singleton> = + new Singleton(() => + NestFactory.create(ApplicationModule, { logger: false }), + ); + + public async open(): Promise { + return (await this.application.get()).listen(37_000); + } + + public async close(): Promise { + return (await this.application.get()).close(); + } +} diff --git a/test/features/openapi_v3/src/api/HttpError.ts b/test/features/openapi_v3/src/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/test/features/openapi_v3/src/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/test/features/openapi_v3/src/api/IConnection.ts b/test/features/openapi_v3/src/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/test/features/openapi_v3/src/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/test/features/openapi_v3/src/api/Primitive.ts b/test/features/openapi_v3/src/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/test/features/openapi_v3/src/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/test/features/openapi_v3/src/api/functional/articles/comments/index.ts b/test/features/openapi_v3/src/api/functional/articles/comments/index.ts new file mode 100644 index 000000000..1fc0a9721 --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/articles/comments/index.ts @@ -0,0 +1,204 @@ +/** + * @packageDocumentation + * @module api.functional.articles.comments + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Resolved, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; +import type { Format } from "typia/lib/tags/Format"; + +import type { IBbsComment } from "../../../structures/IBbsComment"; +import type { IPage } from "../../../structures/IPage"; + +/** + * @controller BbsCommentsController.index + * @path GET /:section/articles/:articleId/comments + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function index( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + query: index.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...index.METADATA, + template: index.METADATA.path, + path: index.path(section, articleId, query), + }); +} +export namespace index { + export type Query = Resolved; + export type Output = Primitive>; + + export const METADATA = { + method: "GET", + path: "/:section/articles/:articleId/comments", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = ( + section: string, + articleId: string & Format<"uuid">, + query: index.Query, + ) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments`; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller BbsCommentsController.at + * @path GET /:section/articles/:articleId/comments/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function at( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, +): Promise { + return PlainFetcher.fetch(connection, { + ...at.METADATA, + template: at.METADATA.path, + path: at.path(section, articleId, id), + }); +} +export namespace at { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/:section/articles/:articleId/comments/:id", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = ( + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, + ) => + `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments/${encodeURIComponent(id ?? "null")}`; +} + +/** + * @controller BbsCommentsController.store + * @path POST /:section/articles/:articleId/comments + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function store( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + input: store.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...store.METADATA, + template: store.METADATA.path, + path: store.path(section, articleId), + }, + input, + ); +} +export namespace store { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/:section/articles/:articleId/comments", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, articleId: string & Format<"uuid">) => + `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments`; +} + +/** + * @controller BbsCommentsController.update + * @path PUT /:section/articles/:articleId/comments/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function update( + connection: IConnection, + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, + input: update.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...update.METADATA, + template: update.METADATA.path, + path: update.path(section, articleId, id), + }, + input, + ); +} +export namespace update { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "PUT", + path: "/:section/articles/:articleId/comments/:id", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = ( + section: string, + articleId: string & Format<"uuid">, + id: string & Format<"uuid">, + ) => + `/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(articleId ?? "null")}/comments/${encodeURIComponent(id ?? "null")}`; +} diff --git a/test/features/openapi_v3/src/api/functional/articles/index.ts b/test/features/openapi_v3/src/api/functional/articles/index.ts new file mode 100644 index 000000000..32910012d --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/articles/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as comments from "./comments"; diff --git a/test/features/openapi_v3/src/api/functional/bbs/articles/index.ts b/test/features/openapi_v3/src/api/functional/bbs/articles/index.ts new file mode 100644 index 000000000..5efa486fc --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/bbs/articles/index.ts @@ -0,0 +1,201 @@ +/** + * @packageDocumentation + * @module api.functional.bbs.articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Resolved, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; +import type { Format } from "typia/lib/tags/Format"; + +import type { IBbsArticle } from "../../../structures/IBbsArticle"; +import type { IPage } from "../../../structures/IPage"; + +/** + * @controller BbsArticlesController.index + * @path GET /bbs/:section/articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function index( + connection: IConnection, + section: string, + query: index.Query, +): Promise { + return PlainFetcher.fetch(connection, { + ...index.METADATA, + template: index.METADATA.path, + path: index.path(section, query), + }); +} +export namespace index { + export type Query = Resolved; + export type Output = Primitive>; + + export const METADATA = { + method: "GET", + path: "/bbs/:section/articles", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, query: index.Query) => { + const variables: URLSearchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(query as any)) + if (undefined === value) continue; + else if (Array.isArray(value)) + value.forEach((elem: any) => variables.append(key, String(elem))); + else variables.set(key, String(value)); + const location: string = `/bbs/${encodeURIComponent(section ?? "null")}/articles`; + return 0 === variables.size + ? location + : `${location}?${variables.toString()}`; + }; +} + +/** + * @controller BbsArticlesController.at + * @path GET /bbs/:section/articles/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function at( + connection: IConnection, + section: string, + id: string & Format<"uuid">, +): Promise { + return PlainFetcher.fetch(connection, { + ...at.METADATA, + template: at.METADATA.path, + path: at.path(section, id), + }); +} +export namespace at { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/bbs/:section/articles/:id", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, id: string & Format<"uuid">) => + `/bbs/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(id ?? "null")}`; +} + +/** + * Store a new article. + * + * @param section Section code + * @param input Content to store + * @returns Newly archived article + * + * @controller BbsArticlesController.store + * @path POST /bbs/:section/articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function store( + connection: IConnection, + section: string, + input: store.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...store.METADATA, + template: store.METADATA.path, + path: store.path(section), + }, + input, + ); +} +export namespace store { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/bbs/:section/articles", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string) => + `/bbs/${encodeURIComponent(section ?? "null")}/articles`; +} + +/** + * Update an article. + * + * @param section Section code + * @param id Target article ID + * @param input Content to update + * @returns Updated content + * + * @controller BbsArticlesController.update + * @path PUT /bbs/:section/articles/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function update( + connection: IConnection, + section: string, + id: string & Format<"uuid">, + input: update.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...update.METADATA, + template: update.METADATA.path, + path: update.path(section, id), + }, + input, + ); +} +export namespace update { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "PUT", + path: "/bbs/:section/articles/:id", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (section: string, id: string & Format<"uuid">) => + `/bbs/${encodeURIComponent(section ?? "null")}/articles/${encodeURIComponent(id ?? "null")}`; +} diff --git a/test/features/openapi_v3/src/api/functional/bbs/index.ts b/test/features/openapi_v3/src/api/functional/bbs/index.ts new file mode 100644 index 000000000..7a891f888 --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/bbs/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.bbs + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as articles from "./articles"; diff --git a/test/features/openapi_v3/src/api/functional/health/index.ts b/test/features/openapi_v3/src/api/functional/health/index.ts new file mode 100644 index 000000000..d5a9f9925 --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/health/index.ts @@ -0,0 +1,35 @@ +/** + * @packageDocumentation + * @module api.functional.health + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +/** + * @controller HealthController.get + * @path GET /health + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function get(connection: IConnection): Promise { + return PlainFetcher.fetch(connection, { + ...get.METADATA, + template: get.METADATA.path, + path: get.path(), + }); +} +export namespace get { + export const METADATA = { + method: "GET", + path: "/health", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/health"; +} diff --git a/test/features/openapi_v3/src/api/functional/index.ts b/test/features/openapi_v3/src/api/functional/index.ts new file mode 100644 index 000000000..a11a25ddb --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/index.ts @@ -0,0 +1,10 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as health from "./health"; +export * as performance from "./performance"; +export * as bbs from "./bbs"; +export * as articles from "./articles"; diff --git a/test/features/openapi_v3/src/api/functional/performance/index.ts b/test/features/openapi_v3/src/api/functional/performance/index.ts new file mode 100644 index 000000000..2e71dbb40 --- /dev/null +++ b/test/features/openapi_v3/src/api/functional/performance/index.ts @@ -0,0 +1,39 @@ +/** + * @packageDocumentation + * @module api.functional.performance + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +import type { IPerformance } from "../../structures/IPerformance"; + +/** + * @controller PerformanceController.get + * @path GET /performance + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function get(connection: IConnection): Promise { + return PlainFetcher.fetch(connection, { + ...get.METADATA, + template: get.METADATA.path, + path: get.path(), + }); +} +export namespace get { + export type Output = Primitive; + + export const METADATA = { + method: "GET", + path: "/performance", + request: null, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/performance"; +} diff --git a/test/features/openapi_v3/src/api/index.ts b/test/features/openapi_v3/src/api/index.ts new file mode 100644 index 000000000..1705f43c8 --- /dev/null +++ b/test/features/openapi_v3/src/api/index.ts @@ -0,0 +1,4 @@ +import * as api from "./module"; + +export * from "./module"; +export default api; diff --git a/test/features/openapi_v3/src/api/module.ts b/test/features/openapi_v3/src/api/module.ts new file mode 100644 index 000000000..dbb6e9a51 --- /dev/null +++ b/test/features/openapi_v3/src/api/module.ts @@ -0,0 +1,5 @@ +export type * from "./IConnection"; +export type * from "./Primitive"; +export * from "./HttpError"; + +export * as functional from "./functional"; diff --git a/test/features/openapi_v3/src/api/structures/IAttachmentFile.ts b/test/features/openapi_v3/src/api/structures/IAttachmentFile.ts new file mode 100644 index 000000000..12c49ef32 --- /dev/null +++ b/test/features/openapi_v3/src/api/structures/IAttachmentFile.ts @@ -0,0 +1,7 @@ +import { tags } from "typia"; + +export interface IAttachmentFile { + name: null | (string & tags.MinLength<1> & tags.MaxLength<255>); + extension: null | (string & tags.MinLength<1> & tags.MaxLength<8>); + url: null | (string & tags.Format<"uri">); +} diff --git a/test/features/openapi_v3/src/api/structures/IBbsArticle.ts b/test/features/openapi_v3/src/api/structures/IBbsArticle.ts new file mode 100644 index 000000000..d81ff9407 --- /dev/null +++ b/test/features/openapi_v3/src/api/structures/IBbsArticle.ts @@ -0,0 +1,24 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; + +export interface IBbsArticle extends IBbsArticle.IStore { + id: string & tags.Format<"uuid">; + section: string; + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsArticle { + export interface IStore { + title: string & tags.MinLength<3> & tags.MaxLength<50>; + body: string; + files: IAttachmentFile[]; + } + + export interface ISummary { + id: string & tags.Format<"uuid">; + section: string; + writer: string; + title: string & tags.MinLength<3> & tags.MaxLength<50>; + created_at: string & tags.Format<"date-time">; + } +} diff --git a/test/features/openapi_v3/src/api/structures/IBbsComment.ts b/test/features/openapi_v3/src/api/structures/IBbsComment.ts new file mode 100644 index 000000000..a60d2f775 --- /dev/null +++ b/test/features/openapi_v3/src/api/structures/IBbsComment.ts @@ -0,0 +1,14 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; + +export interface IBbsComment extends IBbsComment.IStore { + id: string & tags.Format<"uuid">; + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsComment { + export interface IStore { + body: string; + files: IAttachmentFile[]; + } +} diff --git a/test/features/openapi_v3/src/api/structures/IPage.ts b/test/features/openapi_v3/src/api/structures/IPage.ts new file mode 100644 index 000000000..11d6649df --- /dev/null +++ b/test/features/openapi_v3/src/api/structures/IPage.ts @@ -0,0 +1,45 @@ +export interface IPage { + data: T[]; + pagination: IPage.IPagination; +} +export namespace IPage { + /** + * Page request data + */ + export interface IRequest { + /** + * @type uint + */ + page?: number | null; + + /** + * @type uint + */ + limit?: number | null; + } + + /** + * Page information. + */ + export interface IPagination { + /** + * @type uint + */ + current: number; + + /** + * @type uint + */ + limit: number; + + /** + * @type uint + */ + records: number; + + /** + * @type uint + */ + pages: number; + } +} diff --git a/test/features/openapi_v3/src/api/structures/IPerformance.ts b/test/features/openapi_v3/src/api/structures/IPerformance.ts new file mode 100644 index 000000000..22b8f2840 --- /dev/null +++ b/test/features/openapi_v3/src/api/structures/IPerformance.ts @@ -0,0 +1,10 @@ +/** + * Performance info. + * + * @author Samchon + */ +export interface IPerformance { + cpu: NodeJS.CpuUsage; + memory: NodeJS.MemoryUsage; + resource: NodeJS.ResourceUsage; +} diff --git a/test/features/openapi_v3/src/api/structures/ISystem.ts b/test/features/openapi_v3/src/api/structures/ISystem.ts new file mode 100644 index 000000000..0e135bede --- /dev/null +++ b/test/features/openapi_v3/src/api/structures/ISystem.ts @@ -0,0 +1,81 @@ +/** + * System Information. + * + * @author Jeongho Nam + */ +export interface ISystem { + /** + * Random Unique ID. + */ + uid: number; + + /** + * `process.argv` + */ + arguments: string[]; + + /** + * Git commit info. + */ + commit: ISystem.ICommit; + + /** + * `package.json` + */ + package: ISystem.IPackage; + + /** + * Creation time of this server. + */ + created_at: string; +} + +export namespace ISystem { + /** + * Git commit info. + */ + export interface ICommit { + shortHash: string; + branch: string; + hash: string; + subject: string; + sanitizedSubject: string; + body: string; + author: ICommit.IUser; + committer: ICommit.IUser; + authored_at: string; + commited_at: string; + notes?: string; + tags: string[]; + } + export namespace ICommit { + /** + * Git user account info. + */ + export interface IUser { + name: string; + email: string; + } + } + + /** + * NPM package info. + */ + export interface IPackage { + name: string; + version: string; + description: string; + main?: string; + typings?: string; + scripts: Record; + repository: { type: "git"; url: string }; + author: string; + license: string; + bugs: { url: string }; + homepage: string; + devDependencies?: Record; + dependencies: Record; + publishConfig?: { registry: string }; + files?: string[]; + } +} diff --git a/test/features/openapi_v3/src/controllers/BbsArticlesController.ts b/test/features/openapi_v3/src/controllers/BbsArticlesController.ts new file mode 100644 index 000000000..1f7e2aacb --- /dev/null +++ b/test/features/openapi_v3/src/controllers/BbsArticlesController.ts @@ -0,0 +1,85 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller("bbs/:section/articles") +export class BbsArticlesController { + @core.TypedRoute.Get() + public async index( + @core.TypedParam("section") section: string, + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + const limit: number = query.limit ?? 100; + const current: number = query.page ?? 1; + const records: number = limit * (current + 3) + 5; + + return { + pagination: { + current, + limit, + records, + pages: Math.ceil(records / limit), + }, + data: new Array(limit).fill("").map(() => ({ + ...typia.random(), + section, + })), + }; + } + + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("section") section: string, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + return { + ...typia.random(), + id, + section, + }; + } + + /** + * Store a new article. + * + * @param section Section code + * @param input Content to store + * @returns Newly archived article + */ + @core.TypedRoute.Post() + public async store( + @core.TypedParam("section") section: string, + @core.TypedBody() input: IBbsArticle.IStore, + ): Promise { + return { + ...typia.random(), + section, + ...input, + }; + } + + /** + * Update an article. + * + * @param section Section code + * @param id Target article ID + * @param input Content to update + * @returns Updated content + */ + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("section") section: string, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IStore, + ): Promise { + return { + ...typia.random(), + id, + section, + ...input, + }; + } +} diff --git a/test/features/openapi_v3/src/controllers/BbsCommentsController.ts b/test/features/openapi_v3/src/controllers/BbsCommentsController.ts new file mode 100644 index 000000000..be32d656e --- /dev/null +++ b/test/features/openapi_v3/src/controllers/BbsCommentsController.ts @@ -0,0 +1,59 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import typia, { tags } from "typia"; + +import { IBbsComment } from "@api/lib/structures/IBbsComment"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller(":section/articles/:articleId/comments") +export class BbsCommentsController { + @core.TypedRoute.Get() + public async index( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + section; + articleId; + query; + return typia.random>(); + } + + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + section; + articleId; + id; + return typia.random(); + } + + @core.TypedRoute.Post() + public async store( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsComment.IStore, + ): Promise { + section; + articleId; + input; + return typia.random(); + } + + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("section") section: string, + @core.TypedParam("articleId") articleId: string & tags.Format<"uuid">, + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsComment.IStore, + ): Promise { + section; + articleId; + id; + input; + return typia.random(); + } +} diff --git a/test/features/openapi_v3/src/controllers/HealthController.ts b/test/features/openapi_v3/src/controllers/HealthController.ts new file mode 100644 index 000000000..f7e06aef4 --- /dev/null +++ b/test/features/openapi_v3/src/controllers/HealthController.ts @@ -0,0 +1,8 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; + +@Controller("health") +export class HealthController { + @core.TypedRoute.Get() + public get(): void {} +} diff --git a/test/features/openapi_v3/src/controllers/PerformanceController.ts b/test/features/openapi_v3/src/controllers/PerformanceController.ts new file mode 100644 index 000000000..616548cf8 --- /dev/null +++ b/test/features/openapi_v3/src/controllers/PerformanceController.ts @@ -0,0 +1,16 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; + +import { IPerformance } from "@api/lib/structures/IPerformance"; + +@Controller("performance") +export class PerformanceController { + @core.TypedRoute.Get() + public async get(): Promise { + return { + cpu: process.cpuUsage(), + memory: process.memoryUsage(), + resource: process.resourceUsage(), + }; + } +} diff --git a/test/features/openapi_v3/src/modules/ApplicationModule.ts b/test/features/openapi_v3/src/modules/ApplicationModule.ts new file mode 100644 index 000000000..ca207b7e6 --- /dev/null +++ b/test/features/openapi_v3/src/modules/ApplicationModule.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; + +import { BbsModule } from "./BbsModule"; +import { CommonModule } from "./CommonModule"; + +@Module({ + imports: [CommonModule, BbsModule], +}) +export class ApplicationModule {} diff --git a/test/features/openapi_v3/src/modules/BbsModule.ts b/test/features/openapi_v3/src/modules/BbsModule.ts new file mode 100644 index 000000000..0b20a1419 --- /dev/null +++ b/test/features/openapi_v3/src/modules/BbsModule.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; + +import { BbsArticlesController } from "../controllers/BbsArticlesController"; +import { BbsCommentsController } from "../controllers/BbsCommentsController"; + +@Module({ + controllers: [BbsArticlesController, BbsCommentsController], +}) +export class BbsModule {} diff --git a/test/features/openapi_v3/src/modules/CommonModule.ts b/test/features/openapi_v3/src/modules/CommonModule.ts new file mode 100644 index 000000000..5d2c14f83 --- /dev/null +++ b/test/features/openapi_v3/src/modules/CommonModule.ts @@ -0,0 +1,9 @@ +import { Module } from "@nestjs/common"; + +import { HealthModule } from "./HealthModule"; +import { PerformanceModule } from "./PerformanceModule"; + +@Module({ + imports: [HealthModule, PerformanceModule], +}) +export class CommonModule {} diff --git a/test/features/openapi_v3/src/modules/HealthModule.ts b/test/features/openapi_v3/src/modules/HealthModule.ts new file mode 100644 index 000000000..76493d003 --- /dev/null +++ b/test/features/openapi_v3/src/modules/HealthModule.ts @@ -0,0 +1,8 @@ +import { Module } from "@nestjs/common"; + +import { HealthController } from "../controllers/HealthController"; + +@Module({ + controllers: [HealthController], +}) +export class HealthModule {} diff --git a/test/features/openapi_v3/src/modules/PerformanceModule.ts b/test/features/openapi_v3/src/modules/PerformanceModule.ts new file mode 100644 index 000000000..295714dc1 --- /dev/null +++ b/test/features/openapi_v3/src/modules/PerformanceModule.ts @@ -0,0 +1,8 @@ +import { Module } from "@nestjs/common"; + +import { PerformanceController } from "../controllers/PerformanceController"; + +@Module({ + controllers: [PerformanceController], +}) +export class PerformanceModule {} diff --git a/test/features/openapi_v3/src/test/features/test_openapi_v3.ts b/test/features/openapi_v3/src/test/features/test_openapi_v3.ts new file mode 100644 index 000000000..f60460a3f --- /dev/null +++ b/test/features/openapi_v3/src/test/features/test_openapi_v3.ts @@ -0,0 +1,8 @@ +import { OpenApiV3 } from "@samchon/openapi"; +import typia from "typia"; + +import swagger from "../../../swagger.json"; + +export const test_openapi_v3 = (): void => { + typia.assert(swagger); +} \ No newline at end of file diff --git a/test/features/openapi_v3/src/test/index.ts b/test/features/openapi_v3/src/test/index.ts new file mode 100644 index 000000000..7e8f43d54 --- /dev/null +++ b/test/features/openapi_v3/src/test/index.ts @@ -0,0 +1,47 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); + await server.close(); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/openapi_v3/swagger.json b/test/features/openapi_v3/swagger.json new file mode 100644 index 000000000..b89d5d9ec --- /dev/null +++ b/test/features/openapi_v3/swagger.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.1","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"components":{"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"limit":{"type":"integer","nullable":true}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"nullable":true},"extension":{"type":"string","minLength":1,"maxLength":8,"nullable":true},"url":{"type":"string","format":"uri","nullable":true}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"type":"integer","nullable":true},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","nullable":true},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"type":"integer","nullable":true},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","nullable":true},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"tags":[]} \ No newline at end of file diff --git a/test/features/openapi_v3/tsconfig.json b/test/features/openapi_v3/tsconfig.json new file mode 100644 index 000000000..ef75df78e --- /dev/null +++ b/test/features/openapi_v3/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + } + } \ No newline at end of file diff --git a/test/package.json b/test/package.json index b27c17625..42b0b0ba9 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.6.1", + "version": "3.7.0-dev.20240711", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.6.1", + "@nestia/sdk": "^3.7.0-dev.20240711", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.4", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.6.1", + "@nestia/core": "^3.7.0-dev.20240711", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.6.1", + "@nestia/fetcher": "^3.7.0-dev.20240711", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From 03b394d7f55338510cbad4e8a45398df04320c02 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 12 Jul 2024 16:39:58 +0900 Subject: [PATCH 020/204] New decorator `@SwaggerExample()`. ```typescript import core from "@nestia/core"; import { Controller } from "@nestjs/common"; import typia, { tags } from "typia"; import { v4 } from "uuid"; import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; @Controller("bbs/articles") export class BbsArticlesController { /** * Create an article. * * @param request Request object from express. Must be disappeared in SDK * @param input Content to store * @returns Newly archived article * * @author Samchon * @warning This is an fake API */ @core.SwaggerExample.Response(typia.random()) @core.TypedRoute.Post() public async create( @core.SwaggerExample.Parameter(typia.random()) @core.SwaggerExample.Parameter("x", typia.random()) @core.SwaggerExample.Parameter("y", typia.random()) @core.SwaggerExample.Parameter("z", typia.random()) @core.TypedBody() input: IBbsArticle.ICreate, ): Promise { const output: IBbsArticle = { ...typia.random(), ...input, }; return output; } @core.SwaggerExample.Response(typia.random()) @core.SwaggerExample.Response("a", typia.random()) @core.SwaggerExample.Response("b", typia.random()) @core.TypedRoute.Put(":id") public async update( @core.SwaggerExample.Parameter(v4()) @core.TypedParam("id") id: string & tags.Format<"uuid">, @core.SwaggerExample.Parameter(typia.random()) @core.TypedBody() input: IBbsArticle.IUpdate, ): Promise { return { ...typia.random(), ...input, id, }; } } ``` --- package.json | 2 +- packages/core/package.json | 6 +- .../core/src/decorators/SwaggerExample.ts | 100 +++++ .../core/src/decorators/WebSocketRoute.ts | 2 +- packages/core/src/module.ts | 1 + packages/fetcher/package.json | 2 +- packages/sdk/package.json | 10 +- .../analyses/ReflectHttpOperationAnalyzer.ts | 19 + .../analyses/TypedHttpOperationAnalyzer.ts | 2 + .../internal/SwaggerSchemaGenerator.ts | 12 + .../src/structures/IReflectHttpOperation.ts | 12 + .../sdk/src/structures/ITypedHttpRoute.ts | 2 + .../src/controllers/SecurityController.ts | 1 - .../features/swagger-example/nestia.config.ts | 16 + test/features/swagger-example/src/Backend.ts | 27 ++ .../swagger-example/src/api/HttpError.ts | 1 + .../swagger-example/src/api/IConnection.ts | 1 + .../swagger-example/src/api/Primitive.ts | 1 + .../src/api/functional/bbs/articles/index.ts | 112 ++++++ .../src/api/functional/bbs/index.ts | 7 + .../src/api/functional/index.ts | 7 + .../features/swagger-example/src/api/index.ts | 4 + .../swagger-example/src/api/module.ts | 5 + .../src/api/structures/IBbsArticle.ts | 43 ++ .../src/controllers/BbsArticlesController.ts | 55 +++ .../src/test/features/test_swagger_example.ts | 54 +++ .../swagger-example/src/test/index.ts | 49 +++ test/features/swagger-example/swagger.json | 370 ++++++++++++++++++ test/features/swagger-example/tsconfig.json | 98 +++++ test/package.json | 8 +- 30 files changed, 1013 insertions(+), 16 deletions(-) create mode 100644 packages/core/src/decorators/SwaggerExample.ts create mode 100644 test/features/swagger-example/nestia.config.ts create mode 100644 test/features/swagger-example/src/Backend.ts create mode 100644 test/features/swagger-example/src/api/HttpError.ts create mode 100644 test/features/swagger-example/src/api/IConnection.ts create mode 100644 test/features/swagger-example/src/api/Primitive.ts create mode 100644 test/features/swagger-example/src/api/functional/bbs/articles/index.ts create mode 100644 test/features/swagger-example/src/api/functional/bbs/index.ts create mode 100644 test/features/swagger-example/src/api/functional/index.ts create mode 100644 test/features/swagger-example/src/api/index.ts create mode 100644 test/features/swagger-example/src/api/module.ts create mode 100644 test/features/swagger-example/src/api/structures/IBbsArticle.ts create mode 100644 test/features/swagger-example/src/controllers/BbsArticlesController.ts create mode 100644 test/features/swagger-example/src/test/features/test_swagger_example.ts create mode 100644 test/features/swagger-example/src/test/index.ts create mode 100644 test/features/swagger-example/swagger.json create mode 100644 test/features/swagger-example/tsconfig.json diff --git a/package.json b/package.json index 95747d85b..238c85d55 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.0-dev.20240711", + "version": "3.7.0-dev.20240712", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index a31ce9903..46e8d2d38 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.0-dev.20240711", + "version": "3.7.0-dev.20240712", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.0-dev.20240711", + "@nestia/fetcher": "^3.7.0-dev.20240712", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.3.4", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.0-dev.20240711", + "@nestia/fetcher": ">=3.7.0-dev.20240712", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/core/src/decorators/SwaggerExample.ts b/packages/core/src/decorators/SwaggerExample.ts new file mode 100644 index 000000000..84625787a --- /dev/null +++ b/packages/core/src/decorators/SwaggerExample.ts @@ -0,0 +1,100 @@ +export namespace SwaggerExample { + export function Response(value: T): MethodDecorator; + export function Response(key: string, value: T): MethodDecorator; + export function Response(...args: any[]): MethodDecorator { + return function SwaggerExampleResponse( + _target: Object, + _propertyKey: string | symbol, + descriptor: TypedPropertyDescriptor, + ): TypedPropertyDescriptor { + emplaceValue(emplaceOfResponse(descriptor))(args); + return descriptor; + }; + } + + export function Parameter(value: T): ParameterDecorator; + export function Parameter(key: string, value: T): ParameterDecorator; + export function Parameter(...args: any[]): ParameterDecorator { + return function SwaggerExampleParameter( + target: Object, + propertyKey: string | symbol | undefined, + index: number, + ): void { + emplaceValue(emplaceOfParameter(target, propertyKey ?? "", index))(args); + }; + } + + export interface IData { + examples?: Record; + example?: T; + index?: number; + } +} + +const emplaceValue = + (data: SwaggerExample.IData) => + (args: any[]) => { + if (args.length === 1) data.example = args[0]; + else { + const key: string = args[0]; + const value: T = args[1]; + data.examples ??= {}; + data.examples[key] = value; + } + }; + +const emplaceOfResponse = ( + descriptor: TypedPropertyDescriptor, +): SwaggerExample.IData => { + const oldbie: SwaggerExample.IData | undefined = Reflect.getMetadata( + "nestia/SwaggerExample/Response", + descriptor.value, + ); + if (oldbie !== undefined) return oldbie; + const newbie: SwaggerExample.IData = {}; + Reflect.defineMetadata( + "nestia/SwaggerExample/Response", + newbie, + descriptor.value, + ); + return newbie; +}; + +const emplaceOfParameter = ( + target: Object, + propertyKey: string | symbol, + index: number, +): SwaggerExample.IData => { + const array: SwaggerExample.IData[] = emplaceArrayOfParameters( + target, + propertyKey, + ); + const oldibe: SwaggerExample.IData | undefined = array.find( + (e) => e.index === index, + ); + if (oldibe !== undefined) return oldibe; + + const data: SwaggerExample.IData = { index }; + array.push(data); + return data; +}; + +const emplaceArrayOfParameters = ( + target: Object, + propertyKey: string | symbol, +): SwaggerExample.IData[] => { + const array: SwaggerExample.IData[] | undefined = Reflect.getMetadata( + "nestia/SwaggerExample/Parameters", + target, + propertyKey, + ); + if (array !== undefined) return array; + const newbie: SwaggerExample.IData[] = []; + Reflect.defineMetadata( + "nestia/SwaggerExample/Parameters", + newbie, + target, + propertyKey, + ); + return newbie; +}; diff --git a/packages/core/src/decorators/WebSocketRoute.ts b/packages/core/src/decorators/WebSocketRoute.ts index e85281f18..1881b6f72 100644 --- a/packages/core/src/decorators/WebSocketRoute.ts +++ b/packages/core/src/decorators/WebSocketRoute.ts @@ -48,7 +48,7 @@ export function WebSocketRoute( _target: Object, _propertyKey: string | symbol, descriptor: TypedPropertyDescriptor, - ) { + ): TypedPropertyDescriptor { Reflect.defineMetadata( "nestia/WebSocketRoute", { diff --git a/packages/core/src/module.ts b/packages/core/src/module.ts index 7e206055f..b0cf800af 100644 --- a/packages/core/src/module.ts +++ b/packages/core/src/module.ts @@ -15,6 +15,7 @@ export * from "./decorators/EncryptedBody"; export * from "./decorators/EncryptedModule"; export * from "./decorators/PlainBody"; export * from "./decorators/SwaggerCustomizer"; +export * from "./decorators/SwaggerExample"; export * from "./adaptors/WebSocketAdaptor"; export * from "./decorators/WebSocketRoute"; diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index a4e969731..95fe1907d 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.0-dev.20240711", + "version": "3.7.0-dev.20240712", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 84d1b7169..1a7cc9255 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.0-dev.20240711", + "version": "3.7.0-dev.20240712", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.0-dev.20240711", - "@nestia/core": "^3.7.0-dev.20240711", + "@nestia/fetcher": "^3.7.0-dev.20240712", + "@nestia/core": "^3.7.0-dev.20240712", "@samchon/openapi": "^0.3.4", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.4.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.0-dev.20240711", - "@nestia/core": ">=3.7.0-dev.20240711", + "@nestia/fetcher": ">=3.7.0-dev.20240712", + "@nestia/core": ">=3.7.0-dev.20240712", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/analyses/ReflectHttpOperationAnalyzer.ts b/packages/sdk/src/analyses/ReflectHttpOperationAnalyzer.ts index 42f5ba116..0524195ea 100644 --- a/packages/sdk/src/analyses/ReflectHttpOperationAnalyzer.ts +++ b/packages/sdk/src/analyses/ReflectHttpOperationAnalyzer.ts @@ -1,3 +1,4 @@ +import { SwaggerExample } from "@nestia/core"; import { HEADERS_METADATA, HTTP_CODE_METADATA, @@ -65,6 +66,19 @@ export namespace ReflectHttpOperationAnalyzer { _Analyze_http_parameter(...tuple); if (child !== null) output.push(child); } + const examples: SwaggerExample.IData[] = + Reflect.getMetadata( + "nestia/SwaggerExample/Parameters", + props.controller.prototype, + props.name, + ) ?? []; + for (const p of output) { + const e = examples.find((elem) => elem.index === p.index); + if (e !== undefined) { + p.example = e.example; + p.examples = e.examples; + } + } return output.sort((x, y) => x.index - y.index); })(); @@ -82,6 +96,8 @@ export namespace ReflectHttpOperationAnalyzer { } // DO CONSTRUCT + const example: SwaggerExample.IData | undefined = + Reflect.getMetadata("nestia/SwaggerExample/Response", props.function); const meta: IReflectHttpOperation = { protocol: "http", function: props.function, @@ -122,6 +138,9 @@ export namespace ReflectHttpOperationAnalyzer { []), ]), ], + ...(example + ? { example: example.example, examples: example.examples } + : {}), }; // VALIDATE PATH ARGUMENTS diff --git a/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts b/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts index 1b4614704..7038f3add 100644 --- a/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts +++ b/packages/sdk/src/analyses/TypedHttpOperationAnalyzer.ts @@ -183,6 +183,8 @@ export namespace TypedHttpOperationAnalyzer { ), security, exceptions, + example: props.operation.example, + examples: props.operation.examples, }; // CONFIGURE PATHS diff --git a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts index 6751fadca..8e15751bc 100644 --- a/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts +++ b/packages/sdk/src/generates/internal/SwaggerSchemaGenerator.ts @@ -143,6 +143,10 @@ export namespace SwaggerSchemaGenerator { : { [route.output.contentType]: { schema: coalesce(props)(result), + ...{ + example: route.example, + examples: route.examples, + }, }, }, ...(props.config.additional === true @@ -205,6 +209,10 @@ export namespace SwaggerSchemaGenerator { content: { [contentType]: { schema, + ...{ + example: param.example, + examples: param.examples, + }, }, }, required: true, @@ -365,6 +373,10 @@ export namespace SwaggerSchemaGenerator { jsDocTags: p.jsDocTags, kind: "title", }), + ...{ + example: p.example, + examples: p.examples, + }, }; }; diff --git a/packages/sdk/src/structures/IReflectHttpOperation.ts b/packages/sdk/src/structures/IReflectHttpOperation.ts index 8ba1b6dea..c01e44e07 100644 --- a/packages/sdk/src/structures/IReflectHttpOperation.ts +++ b/packages/sdk/src/structures/IReflectHttpOperation.ts @@ -19,6 +19,8 @@ export interface IReflectHttpOperation { number | "2XX" | "3XX" | "4XX" | "5XX", IReflectHttpOperation.IException >; + example?: any; + examples?: Record; swaggerTags: string[]; } export namespace IReflectHttpOperation { @@ -34,6 +36,8 @@ export namespace IReflectHttpOperation { index: number; name: string; field: string | undefined; + example?: any; + examples?: Record; } export interface IHeadersParameter { custom: true; @@ -41,6 +45,8 @@ export namespace IReflectHttpOperation { index: number; name: string; field: string | undefined; + example?: any; + examples?: Record; } export interface IQueryParameter { custom: true; @@ -48,6 +54,8 @@ export namespace IReflectHttpOperation { index: number; name: string; field: string | undefined; + example?: any; + examples?: Record; } export interface IBodyParameter { custom: true; @@ -61,6 +69,8 @@ export namespace IReflectHttpOperation { | "application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain"; + example?: any; + examples?: Record; } export interface IPathParameter { custom: true; @@ -68,6 +78,8 @@ export namespace IReflectHttpOperation { index: number; name: string; field: string | undefined; + example?: any; + examples?: Record; } export interface IException { diff --git a/packages/sdk/src/structures/ITypedHttpRoute.ts b/packages/sdk/src/structures/ITypedHttpRoute.ts index 462570512..d034d5772 100644 --- a/packages/sdk/src/structures/ITypedHttpRoute.ts +++ b/packages/sdk/src/structures/ITypedHttpRoute.ts @@ -32,6 +32,8 @@ export interface ITypedHttpRoute { number | "2XX" | "3XX" | "4XX" | "5XX", ITypedHttpRoute.IOutput >; + example?: any; + examples?: Record; swaggerTags: string[]; } diff --git a/test/features/security/src/controllers/SecurityController.ts b/test/features/security/src/controllers/SecurityController.ts index d70d4b63b..3ae39f1c3 100644 --- a/test/features/security/src/controllers/SecurityController.ts +++ b/test/features/security/src/controllers/SecurityController.ts @@ -4,7 +4,6 @@ import { ApiBasicAuth, ApiBearerAuth, ApiOAuth2, - ApiSecurity, } from "@nestjs/swagger"; import typia from "typia"; diff --git a/test/features/swagger-example/nestia.config.ts b/test/features/swagger-example/nestia.config.ts new file mode 100644 index 000000000..47ca3e019 --- /dev/null +++ b/test/features/swagger-example/nestia.config.ts @@ -0,0 +1,16 @@ +import { INestiaConfig } from "@nestia/sdk"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + output: "src/api", + swagger: { + output: "swagger.json", + beautify: true, + security: { + bearer: { + type: "apiKey", + }, + }, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/swagger-example/src/Backend.ts b/test/features/swagger-example/src/Backend.ts new file mode 100644 index 000000000..be2c2d840 --- /dev/null +++ b/test/features/swagger-example/src/Backend.ts @@ -0,0 +1,27 @@ +import core from "@nestia/core"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; + +export class Backend { + private application_?: INestApplication; + + public async open(): Promise { + this.application_ = await NestFactory.create( + await core.EncryptedModule.dynamic(__dirname + "/controllers", { + key: "A".repeat(32), + iv: "B".repeat(16), + }), + { logger: false }, + ); + await this.application_.listen(37_000); + } + + public async close(): Promise { + if (this.application_ === undefined) return; + + const app = this.application_; + await app.close(); + + delete this.application_; + } +} diff --git a/test/features/swagger-example/src/api/HttpError.ts b/test/features/swagger-example/src/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/test/features/swagger-example/src/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/test/features/swagger-example/src/api/IConnection.ts b/test/features/swagger-example/src/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/test/features/swagger-example/src/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/test/features/swagger-example/src/api/Primitive.ts b/test/features/swagger-example/src/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/test/features/swagger-example/src/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/test/features/swagger-example/src/api/functional/bbs/articles/index.ts b/test/features/swagger-example/src/api/functional/bbs/articles/index.ts new file mode 100644 index 000000000..92535e89a --- /dev/null +++ b/test/features/swagger-example/src/api/functional/bbs/articles/index.ts @@ -0,0 +1,112 @@ +/** + * @packageDocumentation + * @module api.functional.bbs.articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Primitive } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; +import type { Format } from "typia/lib/tags/Format"; + +import type { IBbsArticle } from "../../../structures/IBbsArticle"; + +/** + * Create an article. + * + * @param input Content to store + * @returns Newly archived article + * @author Samchon + * @warning This is an fake API + * + * @controller BbsArticlesController.create + * @path POST /bbs/articles + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function create( + connection: IConnection, + input: create.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...create.METADATA, + template: create.METADATA.path, + path: create.path(), + }, + input, + ); +} +export namespace create { + export type Input = Primitive; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/bbs/articles", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = () => "/bbs/articles"; +} + +/** + * @controller BbsArticlesController.update + * @path PUT /bbs/articles/:id + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function update( + connection: IConnection, + id: string & Format<"uuid">, + input: update.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...update.METADATA, + template: update.METADATA.path, + path: update.path(id), + }, + input, + ); +} +export namespace update { + export type Input = Primitive>; + export type Output = Primitive; + + export const METADATA = { + method: "PUT", + path: "/bbs/articles/:id", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: null, + } as const; + + export const path = (id: string & Format<"uuid">) => + `/bbs/articles/${encodeURIComponent(id ?? "null")}`; +} diff --git a/test/features/swagger-example/src/api/functional/bbs/index.ts b/test/features/swagger-example/src/api/functional/bbs/index.ts new file mode 100644 index 000000000..7a891f888 --- /dev/null +++ b/test/features/swagger-example/src/api/functional/bbs/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.bbs + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as articles from "./articles"; diff --git a/test/features/swagger-example/src/api/functional/index.ts b/test/features/swagger-example/src/api/functional/index.ts new file mode 100644 index 000000000..26113199a --- /dev/null +++ b/test/features/swagger-example/src/api/functional/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as bbs from "./bbs"; diff --git a/test/features/swagger-example/src/api/index.ts b/test/features/swagger-example/src/api/index.ts new file mode 100644 index 000000000..1705f43c8 --- /dev/null +++ b/test/features/swagger-example/src/api/index.ts @@ -0,0 +1,4 @@ +import * as api from "./module"; + +export * from "./module"; +export default api; diff --git a/test/features/swagger-example/src/api/module.ts b/test/features/swagger-example/src/api/module.ts new file mode 100644 index 000000000..dbb6e9a51 --- /dev/null +++ b/test/features/swagger-example/src/api/module.ts @@ -0,0 +1,5 @@ +export type * from "./IConnection"; +export type * from "./Primitive"; +export * from "./HttpError"; + +export * as functional from "./functional"; diff --git a/test/features/swagger-example/src/api/structures/IBbsArticle.ts b/test/features/swagger-example/src/api/structures/IBbsArticle.ts new file mode 100644 index 000000000..74fa6e1d8 --- /dev/null +++ b/test/features/swagger-example/src/api/structures/IBbsArticle.ts @@ -0,0 +1,43 @@ +export interface IBbsArticle extends IBbsArticle.ICreate { + /** + * @format uuid + */ + id: string; + + /** + * @format date-time + */ + created_at: string; +} +export namespace IBbsArticle { + export interface ICreate { + /** + * @minLength 3 + * @maxLength 50 + */ + title: string; + body: string; + files: IAttachmentFile[]; + } + + export type IUpdate = Partial; +} + +export interface IAttachmentFile { + /** + * @minLengt 1 + * @maxLength 255 + */ + name: string | null; + + /** + * @minLength 1 + * @maxLength 8 + */ + extension: string | null; + + /** + * @format uri + */ + url: string; +} diff --git a/test/features/swagger-example/src/controllers/BbsArticlesController.ts b/test/features/swagger-example/src/controllers/BbsArticlesController.ts new file mode 100644 index 000000000..3f3aa218d --- /dev/null +++ b/test/features/swagger-example/src/controllers/BbsArticlesController.ts @@ -0,0 +1,55 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import typia, { tags } from "typia"; +import { v4 } from "uuid"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; + +@Controller("bbs/articles") +export class BbsArticlesController { + /** + * Create an article. + * + * @param request Request object from express. Must be disappeared in SDK + * @param input Content to store + * @returns Newly archived article + * + * @author Samchon + * @warning This is an fake API + */ + @core.SwaggerExample.Response(typia.random()) + @core.TypedRoute.Post() + public async create( + @core.SwaggerExample.Parameter(typia.random()) + @core.SwaggerExample.Parameter("x", typia.random()) + @core.SwaggerExample.Parameter("y", typia.random()) + @core.SwaggerExample.Parameter("z", typia.random()) + @core.TypedBody() + input: IBbsArticle.ICreate, + ): Promise { + const output: IBbsArticle = { + ...typia.random(), + ...input, + }; + return output; + } + + @core.SwaggerExample.Response(typia.random()) + @core.SwaggerExample.Response("a", typia.random()) + @core.SwaggerExample.Response("b", typia.random()) + @core.TypedRoute.Put(":id") + public async update( + @core.SwaggerExample.Parameter(v4()) + @core.TypedParam("id") + id: string & tags.Format<"uuid">, + @core.SwaggerExample.Parameter(typia.random()) + @core.TypedBody() + input: IBbsArticle.IUpdate, + ): Promise { + return { + ...typia.random(), + ...input, + id, + }; + } +} diff --git a/test/features/swagger-example/src/test/features/test_swagger_example.ts b/test/features/swagger-example/src/test/features/test_swagger_example.ts new file mode 100644 index 000000000..56606af84 --- /dev/null +++ b/test/features/swagger-example/src/test/features/test_swagger_example.ts @@ -0,0 +1,54 @@ +import { OpenApi } from "@samchon/openapi"; +import fs from "fs"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; + +export const test_swagger_example = async (): Promise => { + const swagger: any = JSON.parse( + await fs.promises.readFile(`${__dirname}/../../../swagger.json`, "utf-8"), + ); + typia.assert(swagger); + + // BbsArticlesController.create() + typia.assert<{ + example: IBbsArticle; + }>( + swagger.paths["/bbs/articles"].post.responses["201"].content[ + "application/json" + ], + ); + typia.assert<{ + example: IBbsArticle.ICreate; + examples: { + x: IBbsArticle.ICreate; + y: IBbsArticle.ICreate; + z: IBbsArticle.ICreate; + }; + }>( + swagger.paths["/bbs/articles"].post.requestBody.content["application/json"], + ); + + // BbsArticlesController.update() + typia.assert<{ + example: IBbsArticle; + examples: { + a: IBbsArticle; + b: IBbsArticle; + }; + }>( + swagger.paths["/bbs/articles/{id}"].put.responses["200"].content[ + "application/json" + ], + ); + typia.assert<{ + example: string & tags.Format<"uuid">; + }>(swagger.paths["/bbs/articles/{id}"].put.parameters[0]); + typia.assert<{ + example: IBbsArticle.IUpdate; + }>( + swagger.paths["/bbs/articles/{id}"].put.requestBody.content[ + "application/json" + ], + ); +}; diff --git a/test/features/swagger-example/src/test/index.ts b/test/features/swagger-example/src/test/index.ts new file mode 100644 index 000000000..1a8e4372b --- /dev/null +++ b/test/features/swagger-example/src/test/index.ts @@ -0,0 +1,49 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + location: `${__dirname}/features`, + onComplete: (exec) => { + const elapsed: number = + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); + console.log(` - ${exec.name}: ${elapsed.toLocaleString()} ms`); + }, + }); + await server.close(); + + console.log(__dirname, __dirname.substring(__dirname.length - 2)); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/swagger-example/swagger.json b/test/features/swagger-example/swagger.json new file mode 100644 index 000000000..aa5ef58c4 --- /dev/null +++ b/test/features/swagger-example/swagger.json @@ -0,0 +1,370 @@ +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.7.0-dev.20240711", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/bbs/articles": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "description": "Content to store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBbsArticle.ICreate" + }, + "example": { + "title": "wanfi", + "body": "dihsfonqr", + "files": [ + { + "name": null, + "extension": null, + "url": "https://xkjzcsqgah.mac" + }, + { + "name": null, + "extension": "ib", + "url": "https://hjbkzabvyu.tif" + }, + { + "name": null, + "extension": null, + "url": "https://hgfibjpkhm.wqw" + } + ] + }, + "examples": { + "z": { + "title": "niuzm", + "body": "vjhlv", + "files": [ + { + "name": "kswkxztzbvpoxuupjqdtsvwfkqwmxzyvxysehydczvzwmmpdlaxsttxtnvezzzodlkpsdfsrhhbzuofrcmlettknvjdgdkkhqo", + "extension": "ew", + "url": "https://aqsgnjktsl.aca" + }, + { + "name": "gnwumdwsaldlmzhkgacrxrtvjyynwndltwmqfcxokhjpsqwrbedfjbsfzacdoicaqoxlqbtwntkdbanhnozeyfkcvjipdrokqgvvfbowtckgzsvdmcbhdelrvwmiqbonterexgsxxbeepqgsexiytgvxzniivekgpfikv", + "extension": null, + "url": "https://aggfmwklav.ijm" + }, + { + "name": "zgmfcdxldnprbxrlhqidfpzofjamgcyvzfrtlzquqjitlczyqnuqcmkbwxueerffstugbokobjgcrejzejbixsthbemqvwmkwbxhleafajqukfnucjauwdsneapgosjnxtjwlgzyaobbaxvgavwmjwhggiird", + "extension": "nyi", + "url": "https://sbufdobevq.gec" + } + ] + }, + "y": { + "title": "mzgy", + "body": "uymevmpdas", + "files": [ + { + "name": "ptouplqcgjcqitusvvhnszwowspyxcpvdmtdgnyhxyxydnca", + "extension": null, + "url": "https://verdfefmjz.xhg" + }, + { + "name": "mjitvwkigmahrcvdhrqobraiipcblptprqoozhetzzzlktfdc", + "extension": null, + "url": "https://jqqizhyzom.tte" + }, + { + "name": "reswhbdndrlcozgkwwywvkjgycowdoqneqwhopcvhrgtmalpbgfzhvrfwdbdixyhxdvtzzdwmciwpjyadcpnkoyksyqkpphhlirjxsmkvymigaqkaybmiavrrbaopobepjgkmvoaszilkkpdnjytdwatmsrvfiuodqdmmqharqekemjslifyawmckxcbzycyxatzaionxqxoyqnnbohscelnlimnjjbjfohcwyqydoud", + "extension": "y", + "url": "https://pjmpsvxacs.smz" + } + ] + }, + "x": { + "title": "tiwfhcbficjthjsvhkxvcrmk", + "body": "ksakxgg", + "files": [] + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Newly archived article", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBbsArticle" + }, + "example": { + "id": "471cf11d-fe9a-44ec-95fe-9b36a177af20", + "created_at": "2024-07-12T03:10:03.714Z", + "title": "hbojqusfxdxvdeumyugbt", + "body": "bbjwbm", + "files": [ + { + "name": null, + "extension": null, + "url": "https://tdregslzcx.rbw" + }, + { + "name": "ngzzatngkilxidnygwarylmeootqeptfciryqazlsonievuxwargfvoisyhwvaoiiprxqgzysyxynxlkvylwkanhcztsqostlhtrecxuullppeszurangxxqwgjxjfqsippawrugziwdotpqpztvfpvzjvopspxxrpiaogongkdgati", + "extension": null, + "url": "https://sfmxgrvujc.dpk" + } + ] + } + } + } + } + }, + "summary": "Create an article", + "description": "Create an article." + } + }, + "/bbs/articles/{id}": { + "put": { + "tags": [], + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "example": "67595ae0-0f6a-4cc6-a0a3-2ad88d186199" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartialIBbsArticle.ICreate" + }, + "example": { + "title": "yysmaicfrvejhzg", + "files": [] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBbsArticle" + }, + "example": { + "id": "e313fb9a-5105-43e2-8f8c-fd625afb667b", + "created_at": "2024-06-30T01:01:50.475Z", + "title": "ogrjjzcaanrypgenncvdnlehukaoaj", + "body": "iyduciryf", + "files": [ + { + "name": null, + "extension": null, + "url": "https://wnwxqgwygx.vwq" + }, + { + "name": null, + "extension": null, + "url": "https://bknprzutya.kgf" + }, + { + "name": "znhhzvhymyuybosvhteocafvhigeeufyyouasqxvxwsbwnjxwohriihuwbirgrzfvby", + "extension": null, + "url": "https://rdxqfffvss.orf" + } + ] + }, + "examples": { + "b": { + "id": "9624d317-b124-4cbc-8ee0-4ce817df45e2", + "created_at": "2024-07-13T07:30:24.155Z", + "title": "prxcmgnwiohign", + "body": "ilvyb", + "files": [ + { + "name": null, + "extension": null, + "url": "https://bkmcmcvanp.toi" + }, + { + "name": null, + "extension": "xqyu", + "url": "https://pqiytxcovf.fnj" + }, + { + "name": "qxsiowaknproxtrmecuwwdsenrteikthzughrnkjlgyorwsdqjrz", + "extension": "oqnyw", + "url": "https://ciavlfjiyo.mju" + } + ] + }, + "a": { + "id": "b1637c66-155a-4e65-9f7f-2c9774ac14d7", + "created_at": "2024-07-12T20:26:05.146Z", + "title": "xahjxavbornuphosaqojvi", + "body": "kenhbvfz", + "files": [ + { + "name": "fxpbzvjffasupllrbzmwlgsdbryyybgfhnfgqvvgshvpweafebhvtagtcyoruneimzxwsrniqviqefbcbydsnmtilpnawoacaqrqlenypnmjzzgggwwvuixxdcybeppzmcvdshzvjmegxzjuybyxcbdeuksgyptbnhcrmfxcslebhcjzsutgdhfktbvceusaeezbvijppsagyrxifvxvxfddleklhcebdvlyjogjfnabxddnaicwfvisxaywu", + "extension": "dydhfuyx", + "url": "https://byoyitpyli.vjq" + } + ] + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "IBbsArticle.ICreate": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAttachmentFile" + } + } + }, + "required": [ + "title", + "body", + "files" + ] + }, + "IAttachmentFile": { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "maxLength": 255 + } + ] + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "minLength": 1, + "maxLength": 8 + } + ] + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "IBbsArticle": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "title": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAttachmentFile" + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + }, + "PartialIBbsArticle.ICreate": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAttachmentFile" + } + } + }, + "description": "Make all properties in T optional" + } + }, + "securitySchemes": { + "bearer": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file diff --git a/test/features/swagger-example/tsconfig.json b/test/features/swagger-example/tsconfig.json new file mode 100644 index 000000000..c33dfa28f --- /dev/null +++ b/test/features/swagger-example/tsconfig.json @@ -0,0 +1,98 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + } + } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 42b0b0ba9..388d5c2fe 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.0-dev.20240711", + "version": "3.7.0-dev.20240712", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.0-dev.20240711", + "@nestia/sdk": "^3.7.0-dev.20240712", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.3.4", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.0-dev.20240711", + "@nestia/core": "^3.7.0-dev.20240712", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.0-dev.20240711", + "@nestia/fetcher": "^3.7.0-dev.20240712", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From efa56cd7ec99af3b525539911fb9f760a64126e5 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 12 Jul 2024 19:23:40 +0900 Subject: [PATCH 021/204] Bump up `@samchon/openapi` version of break change. --- benchmark/package.json | 2 +- package.json | 2 +- packages/benchmark/package.json | 2 +- packages/core/package.json | 12 ++++++------ packages/e2e/package.json | 2 +- packages/fetcher/package.json | 4 ++-- packages/migrate/package.json | 2 +- packages/sdk/package.json | 16 ++++++++-------- .../packages/api/package.json | 2 +- .../distribute-assert/packages/api/package.json | 2 +- .../distribute-json/packages/api/package.json | 2 +- .../distribute/packages/api/package.json | 2 +- test/package.json | 12 ++++++------ 13 files changed, 31 insertions(+), 31 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index a0acddfcd..3d86d4c66 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -42,7 +42,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/package.json b/package.json index 238c85d55..7277d76dc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.0-dev.20240712", + "version": "3.7.0", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index e997acefe..bcc4804ad 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -34,7 +34,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.4.3", + "typia": "^6.5.0", "uuid": "^10.0.0" }, "dependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index 46e8d2d38..f27af0b81 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.0-dev.20240712", + "version": "3.7.0", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,10 +36,10 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.0-dev.20240712", + "@nestia/fetcher": "^3.7.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", - "@samchon/openapi": "^0.3.4", + "@samchon/openapi": "^0.4.1", "detect-ts-node": "^1.0.5", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.4.3", + "typia": "^6.5.0", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.0-dev.20240712", + "@nestia/fetcher": ">=3.7.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.4.3 <7.0.0" + "typia": ">=6.5.0 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/e2e/package.json b/packages/e2e/package.json index d88153aeb..dd29e5196 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -41,7 +41,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "files": [ "lib", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 95fe1907d..db14a6044 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.0-dev.20240712", + "version": "3.7.0", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -43,6 +43,6 @@ "src" ], "dependencies": { - "@samchon/openapi": "^0.3.4" + "@samchon/openapi": "^0.4.1" } } \ No newline at end of file diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 0b92fcba3..54fab57d3 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -71,7 +71,7 @@ "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "files": [ "lib", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 1a7cc9255..250b6888c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.0-dev.20240712", + "version": "3.7.0", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,9 +32,9 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.0-dev.20240712", - "@nestia/core": "^3.7.0-dev.20240712", - "@samchon/openapi": "^0.3.4", + "@nestia/fetcher": "^3.7.0", + "@nestia/core": "^3.7.0", + "@samchon/openapi": "^0.4.1", "cli": "^1.0.1", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -44,16 +44,16 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.0-dev.20240712", - "@nestia/core": ">=3.7.0-dev.20240712", + "@nestia/fetcher": ">=3.7.0", + "@nestia/core": ">=3.7.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.4.3 <7.0.0" + "typia": ">=6.5.0 <7.0.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 7b62d4723..1da929fb6 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.3" + "typia": "^6.5.0" } } \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 7b62d4723..1da929fb6 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.3" + "typia": "^6.5.0" } } \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 7b62d4723..1da929fb6 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.3" + "typia": "^6.5.0" } } \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 7b62d4723..1da929fb6 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.4.3" + "typia": "^6.5.0" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index 388d5c2fe..f1be460e0 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.0-dev.20240712", + "version": "3.7.0", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,9 +26,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.0-dev.20240712", + "@nestia/sdk": "^3.7.0", "@nestjs/swagger": "^7.1.2", - "@samchon/openapi": "^0.3.4", + "@samchon/openapi": "^0.4.1", "@types/express": "^4.17.17", "@types/node": "20.11.16", "@types/uuid": "^9.0.8", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.0-dev.20240712", + "@nestia/core": "^3.7.0", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.0-dev.20240712", + "@nestia/fetcher": "^3.7.0", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.4.3", + "typia": "^6.5.0", "uuid": "^9.0.1" } } \ No newline at end of file From 3477b199d24fe38f38786772c34064dbfa7f28c3 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 12 Jul 2024 20:04:16 +0900 Subject: [PATCH 022/204] API Documents for every packages --- .gitignore | 1 + packages/benchmark/typedoc.json | 5 + packages/core/typedoc.json | 5 + packages/e2e/tsconfig.json | 2 +- packages/e2e/typedoc.json | 5 + packages/fetcher/typedoc.json | 5 + test/package.json | 6 +- website/.gitignore | 1 + website/build/typedoc.js | 19 ++++ website/package-lock.json | 167 ++++++++++++++++++++++++++++++-- website/package.json | 3 +- website/typedoc.json | 7 +- 12 files changed, 208 insertions(+), 18 deletions(-) create mode 100644 packages/benchmark/typedoc.json create mode 100644 packages/core/typedoc.json create mode 100644 packages/e2e/typedoc.json create mode 100644 packages/fetcher/typedoc.json create mode 100644 website/build/typedoc.js diff --git a/.gitignore b/.gitignore index 2a6c5e7bf..cd80e2461 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ lib/ node_modules/ packages/*/*.tgz +packages/*/docs package-lock.json pnpm-lock.yaml *.log \ No newline at end of file diff --git a/packages/benchmark/typedoc.json b/packages/benchmark/typedoc.json new file mode 100644 index 000000000..95a7986cd --- /dev/null +++ b/packages/benchmark/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "tsconfig": "tsconfig.json", + "entryPoints": ["src/index.ts"], +} \ No newline at end of file diff --git a/packages/core/typedoc.json b/packages/core/typedoc.json new file mode 100644 index 000000000..95a7986cd --- /dev/null +++ b/packages/core/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "tsconfig": "tsconfig.json", + "entryPoints": ["src/index.ts"], +} \ No newline at end of file diff --git a/packages/e2e/tsconfig.json b/packages/e2e/tsconfig.json index aaf4bb2c9..ec7d5851b 100644 --- a/packages/e2e/tsconfig.json +++ b/packages/e2e/tsconfig.json @@ -12,7 +12,7 @@ "target": "ES5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ "lib": [ "DOM", - "ES2015" + "ESNext" ], /* Specify a set of bundled library declaration files that describe the target runtime environment. */// "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ diff --git a/packages/e2e/typedoc.json b/packages/e2e/typedoc.json new file mode 100644 index 000000000..95a7986cd --- /dev/null +++ b/packages/e2e/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "tsconfig": "tsconfig.json", + "entryPoints": ["src/index.ts"], +} \ No newline at end of file diff --git a/packages/fetcher/typedoc.json b/packages/fetcher/typedoc.json new file mode 100644 index 000000000..95a7986cd --- /dev/null +++ b/packages/fetcher/typedoc.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "tsconfig": "tsconfig.json", + "entryPoints": ["src/index.ts"], +} \ No newline at end of file diff --git a/test/package.json b/test/package.json index f1be460e0..39ed350e5 100644 --- a/test/package.json +++ b/test/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.0", + "@nestia/sdk": "../packages/sdk/nestia-sdk-3.7.0.tgz", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.4.1", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.0", + "@nestia/core": "../packages/core/nestia-core-3.7.0.tgz", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.0", + "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.7.0.tgz", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", diff --git a/website/.gitignore b/website/.gitignore index ff6de6096..242b2042a 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -2,6 +2,7 @@ node_modules/ out/ public/api/ +typedoc-json/ public/robots.txt public/sitemap*.xml diff --git a/website/build/typedoc.js b/website/build/typedoc.js new file mode 100644 index 000000000..a1f991e13 --- /dev/null +++ b/website/build/typedoc.js @@ -0,0 +1,19 @@ +const cp = require("child_process"); +const fs = require("fs"); + +const execute = (str) => { + cp.execSync(str, { cwd: `${__dirname}/..`, stdio: "ignore" }); +}; + +for (const pack of ["benchmark", "core", "e2e", "fetcher"]) { + if (fs.existsSync(`../packages/${pack}/node_modules`) === false) + execute("npm install"); + execute( + [ + `npx typedoc --json typedoc-json/${pack}.json`, + `--options ../packages/${pack}/typedoc.json`, + `--validation.invalidLink false`, + ].join(" "), + ); +} +execute(`npx typedoc --entryPointStrategy merge "typedoc-json/*.json"`); diff --git a/website/package-lock.json b/website/package-lock.json index b03879473..7dcee5ed0 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -15,7 +15,7 @@ "@mui/material": "5.15.6", "@mui/system": "5.15.6", "@nestia/migrate": "^0.14.1", - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.3.4", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", @@ -25,7 +25,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.4.0" + "typia": "^6.4.3" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -34,6 +34,7 @@ "gh-pages": "^5.0.0", "next-sitemap": "^4.2.3", "rimraf": "^5.0.0", + "ts-node": "^10.9.2", "typedoc": "^0.26.2", "typescript": "^5.5.2" } @@ -230,6 +231,28 @@ "integrity": "sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==", "dev": true }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@emotion/babel-plugin": { "version": "11.11.0", "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz", @@ -1266,9 +1289,9 @@ } }, "node_modules/@samchon/openapi": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.3.0.tgz", - "integrity": "sha512-rl+0XwM0DzSOiL664KB6oC5hgfMaXqxweGRVFdTt+U0bFJTIHLO+C+n9KCZUpMln8eQepXQ9RT8HjFAFe+Z6Hg==" + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.3.4.tgz", + "integrity": "sha512-+HylYXGJVYKU7rkjpFr7HzPoNHs726pPRwjkyEbSEi9kRxFDS+CVYc448cLPZIjK03+7m4sd+ltk7k8uIBVFTA==" }, "node_modules/@shikijs/core": { "version": "1.9.1", @@ -1435,6 +1458,30 @@ "node": ">=6.9.0" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@types/acorn": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@types/acorn/-/acorn-4.0.6.tgz", @@ -1586,6 +1633,18 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2063,6 +2122,12 @@ "node": ">=10" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -4344,6 +4409,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "node_modules/markdown-extensions": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-1.1.1.tgz", @@ -7599,6 +7670,64 @@ "node": ">=6.10" } }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", @@ -7700,11 +7829,11 @@ } }, "node_modules/typia": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/typia/-/typia-6.4.0.tgz", - "integrity": "sha512-VJszDm+zGVrA3do9NApwfQYvd2J29vN3H9TpBW4FStVsQazX18GRXx8PmFWAxKb2dJTobUpIm2kQxQKVns6mkA==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/typia/-/typia-6.5.0.tgz", + "integrity": "sha512-wGtAONvKseb7OwG/O/fpbfzhOWMg8h+yDuCws2MX51kScki06ABFHwRngoWQvgNWmXnG4Ny70WIZG1A/0QxReQ==", "dependencies": { - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.4.1", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", @@ -7717,6 +7846,11 @@ "typescript": ">=4.8.0 <5.6.0" } }, + "node_modules/typia/node_modules/@samchon/openapi": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.4.1.tgz", + "integrity": "sha512-2DS0dabVhNpJLqeEg0IRIfFePtBg9ZvxmPlZpqOkh+XuTmlK/I1re+KJpYLLsoncrzeEYUIPvqrFUqem63uJQA==" + }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", @@ -7992,6 +8126,12 @@ "node": ">=8" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -8267,6 +8407,15 @@ "node": ">= 6" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/website/package.json b/website/package.json index 9e32ac508..dbe6294b2 100644 --- a/website/package.json +++ b/website/package.json @@ -4,7 +4,7 @@ "description": "Nestia Guide Documents", "private": true, "scripts": { - "build": "rimraf .next && rimraf .out && typedoc && next build && next-sitemap", + "build": "rimraf .next && rimraf .out && node build/typedoc && next build && next-sitemap", "deploy": "node deploy", "dev": "next dev" }, @@ -43,6 +43,7 @@ "gh-pages": "^5.0.0", "next-sitemap": "^4.2.3", "rimraf": "^5.0.0", + "ts-node": "^10.9.2", "typedoc": "^0.26.2", "typescript": "^5.5.2" } diff --git a/website/typedoc.json b/website/typedoc.json index 5866960e2..04025af06 100644 --- a/website/typedoc.json +++ b/website/typedoc.json @@ -1,7 +1,6 @@ { - "tsconfig": "../packages/core/tsconfig.json", - "entryPoints": [ - "../packages/core/src/index.ts", - ], + "$schema": "https://typedoc.org/schema.json", + "name": "Nestia API Documents", + "entryPointStrategy": "packages", "out": "./public/api" } \ No newline at end of file From b153dec66b73ecf7b61618ddf9dbfc601b16bc67 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 12 Jul 2024 22:12:04 +0900 Subject: [PATCH 023/204] `@nestia/migrate` also supports `@SwaggerExample()`. --- packages/core/package.json | 2 +- .../migrate/assets/input/v3.1/example31.json | 370 ++++++++++++++++++ packages/migrate/package.json | 10 +- .../MigrateNestMethodProgrammer.ts | 106 ++++- packages/sdk/package.json | 4 +- website/build/typedoc.js | 20 +- website/package-lock.json | 363 +++++++++-------- website/package.json | 8 +- 8 files changed, 680 insertions(+), 203 deletions(-) create mode 100644 packages/migrate/assets/input/v3.1/example31.json diff --git a/packages/core/package.json b/packages/core/package.json index f27af0b81..a9a51af1f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.0", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.0.tgz", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.4.1", diff --git a/packages/migrate/assets/input/v3.1/example31.json b/packages/migrate/assets/input/v3.1/example31.json new file mode 100644 index 000000000..aa5ef58c4 --- /dev/null +++ b/packages/migrate/assets/input/v3.1/example31.json @@ -0,0 +1,370 @@ +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.7.0-dev.20240711", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/bbs/articles": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "description": "Content to store", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBbsArticle.ICreate" + }, + "example": { + "title": "wanfi", + "body": "dihsfonqr", + "files": [ + { + "name": null, + "extension": null, + "url": "https://xkjzcsqgah.mac" + }, + { + "name": null, + "extension": "ib", + "url": "https://hjbkzabvyu.tif" + }, + { + "name": null, + "extension": null, + "url": "https://hgfibjpkhm.wqw" + } + ] + }, + "examples": { + "z": { + "title": "niuzm", + "body": "vjhlv", + "files": [ + { + "name": "kswkxztzbvpoxuupjqdtsvwfkqwmxzyvxysehydczvzwmmpdlaxsttxtnvezzzodlkpsdfsrhhbzuofrcmlettknvjdgdkkhqo", + "extension": "ew", + "url": "https://aqsgnjktsl.aca" + }, + { + "name": "gnwumdwsaldlmzhkgacrxrtvjyynwndltwmqfcxokhjpsqwrbedfjbsfzacdoicaqoxlqbtwntkdbanhnozeyfkcvjipdrokqgvvfbowtckgzsvdmcbhdelrvwmiqbonterexgsxxbeepqgsexiytgvxzniivekgpfikv", + "extension": null, + "url": "https://aggfmwklav.ijm" + }, + { + "name": "zgmfcdxldnprbxrlhqidfpzofjamgcyvzfrtlzquqjitlczyqnuqcmkbwxueerffstugbokobjgcrejzejbixsthbemqvwmkwbxhleafajqukfnucjauwdsneapgosjnxtjwlgzyaobbaxvgavwmjwhggiird", + "extension": "nyi", + "url": "https://sbufdobevq.gec" + } + ] + }, + "y": { + "title": "mzgy", + "body": "uymevmpdas", + "files": [ + { + "name": "ptouplqcgjcqitusvvhnszwowspyxcpvdmtdgnyhxyxydnca", + "extension": null, + "url": "https://verdfefmjz.xhg" + }, + { + "name": "mjitvwkigmahrcvdhrqobraiipcblptprqoozhetzzzlktfdc", + "extension": null, + "url": "https://jqqizhyzom.tte" + }, + { + "name": "reswhbdndrlcozgkwwywvkjgycowdoqneqwhopcvhrgtmalpbgfzhvrfwdbdixyhxdvtzzdwmciwpjyadcpnkoyksyqkpphhlirjxsmkvymigaqkaybmiavrrbaopobepjgkmvoaszilkkpdnjytdwatmsrvfiuodqdmmqharqekemjslifyawmckxcbzycyxatzaionxqxoyqnnbohscelnlimnjjbjfohcwyqydoud", + "extension": "y", + "url": "https://pjmpsvxacs.smz" + } + ] + }, + "x": { + "title": "tiwfhcbficjthjsvhkxvcrmk", + "body": "ksakxgg", + "files": [] + } + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Newly archived article", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBbsArticle" + }, + "example": { + "id": "471cf11d-fe9a-44ec-95fe-9b36a177af20", + "created_at": "2024-07-12T03:10:03.714Z", + "title": "hbojqusfxdxvdeumyugbt", + "body": "bbjwbm", + "files": [ + { + "name": null, + "extension": null, + "url": "https://tdregslzcx.rbw" + }, + { + "name": "ngzzatngkilxidnygwarylmeootqeptfciryqazlsonievuxwargfvoisyhwvaoiiprxqgzysyxynxlkvylwkanhcztsqostlhtrecxuullppeszurangxxqwgjxjfqsippawrugziwdotpqpztvfpvzjvopspxxrpiaogongkdgati", + "extension": null, + "url": "https://sfmxgrvujc.dpk" + } + ] + } + } + } + } + }, + "summary": "Create an article", + "description": "Create an article." + } + }, + "/bbs/articles/{id}": { + "put": { + "tags": [], + "parameters": [ + { + "name": "id", + "in": "path", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true, + "example": "67595ae0-0f6a-4cc6-a0a3-2ad88d186199" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PartialIBbsArticle.ICreate" + }, + "example": { + "title": "yysmaicfrvejhzg", + "files": [] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBbsArticle" + }, + "example": { + "id": "e313fb9a-5105-43e2-8f8c-fd625afb667b", + "created_at": "2024-06-30T01:01:50.475Z", + "title": "ogrjjzcaanrypgenncvdnlehukaoaj", + "body": "iyduciryf", + "files": [ + { + "name": null, + "extension": null, + "url": "https://wnwxqgwygx.vwq" + }, + { + "name": null, + "extension": null, + "url": "https://bknprzutya.kgf" + }, + { + "name": "znhhzvhymyuybosvhteocafvhigeeufyyouasqxvxwsbwnjxwohriihuwbirgrzfvby", + "extension": null, + "url": "https://rdxqfffvss.orf" + } + ] + }, + "examples": { + "b": { + "id": "9624d317-b124-4cbc-8ee0-4ce817df45e2", + "created_at": "2024-07-13T07:30:24.155Z", + "title": "prxcmgnwiohign", + "body": "ilvyb", + "files": [ + { + "name": null, + "extension": null, + "url": "https://bkmcmcvanp.toi" + }, + { + "name": null, + "extension": "xqyu", + "url": "https://pqiytxcovf.fnj" + }, + { + "name": "qxsiowaknproxtrmecuwwdsenrteikthzughrnkjlgyorwsdqjrz", + "extension": "oqnyw", + "url": "https://ciavlfjiyo.mju" + } + ] + }, + "a": { + "id": "b1637c66-155a-4e65-9f7f-2c9774ac14d7", + "created_at": "2024-07-12T20:26:05.146Z", + "title": "xahjxavbornuphosaqojvi", + "body": "kenhbvfz", + "files": [ + { + "name": "fxpbzvjffasupllrbzmwlgsdbryyybgfhnfgqvvgshvpweafebhvtagtcyoruneimzxwsrniqviqefbcbydsnmtilpnawoacaqrqlenypnmjzzgggwwvuixxdcybeppzmcvdshzvjmegxzjuybyxcbdeuksgyptbnhcrmfxcslebhcjzsutgdhfktbvceusaeezbvijppsagyrxifvxvxfddleklhcebdvlyjogjfnabxddnaicwfvisxaywu", + "extension": "dydhfuyx", + "url": "https://byoyitpyli.vjq" + } + ] + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "IBbsArticle.ICreate": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAttachmentFile" + } + } + }, + "required": [ + "title", + "body", + "files" + ] + }, + "IAttachmentFile": { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "maxLength": 255 + } + ] + }, + "extension": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "minLength": 1, + "maxLength": 8 + } + ] + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "IBbsArticle": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "title": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAttachmentFile" + } + } + }, + "required": [ + "id", + "created_at", + "title", + "body", + "files" + ] + }, + "PartialIBbsArticle.ICreate": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 3, + "maxLength": 50 + }, + "body": { + "type": "string" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IAttachmentFile" + } + } + }, + "description": "Make all properties in T optional" + } + }, + "securitySchemes": { + "bearer": { + "type": "apiKey", + "in": "header", + "name": "Authorization" + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 54fab57d3..3f96ef584 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/migrate", - "version": "0.14.3", + "version": "0.15.0", "description": "Migration program from swagger to NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,10 +36,10 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/benchmark": "^0.1.0", - "@nestia/core": "^3.5.0", + "@nestia/benchmark": "^0.1.1", + "@nestia/core": "^3.7.0", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.5.0", + "@nestia/fetcher": "^3.7.0", "@nestjs/common": "^10.3.8", "@nestjs/core": "^10.3.8", "@nestjs/platform-express": "^10.3.8", @@ -65,7 +65,7 @@ "typescript-transform-paths": "^3.4.6" }, "dependencies": { - "@samchon/openapi": "^0.3.2", + "@samchon/openapi": "^0.4.2", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", diff --git a/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts b/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts index 599c6bfba..7d4cdc516 100644 --- a/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts +++ b/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts @@ -2,6 +2,7 @@ import { OpenApi } from "@samchon/openapi"; import ts from "typescript"; import { ExpressionFactory } from "typia/lib/factories/ExpressionFactory"; import { IdentifierFactory } from "typia/lib/factories/IdentifierFactory"; +import { LiteralFactory } from "typia/lib/factories/LiteralFactory"; import { TypeFactory } from "typia/lib/factories/TypeFactory"; import { IMigrateRoute } from "../structures/IMigrateRoute"; @@ -87,6 +88,17 @@ export namespace MigrateNestMethodProgrammer { name: instance, }), ); + + // EXAMPLES + const decorators: ts.Decorator[] = []; + if (route.success) + decorators.push( + ...writeExampleDecorators("Response")(importer)( + route.success.media(), + ), + ); + + // ROUTER const router = (instance: string) => ts.factory.createDecorator( ts.factory.createCallExpression( @@ -97,8 +109,6 @@ export namespace MigrateNestMethodProgrammer { [ts.factory.createStringLiteral(route.path)], ), ); - - const decorators: ts.Decorator[] = []; if (route.success?.["x-nestia-encrypted"]) decorators.push(router("EncryptedRoute")); else if (route.success?.type === "text/plain") @@ -142,8 +152,12 @@ export namespace MigrateNestMethodProgrammer { isNaN(Number(key)) ? ts.factory.createStringLiteral(key) : ExpressionFactory.number(Number(key)), - ...(value.description?.length - ? [ts.factory.createStringLiteral(value.description)] + ...(value.response().description?.length + ? [ + ts.factory.createStringLiteral( + value.response().description!, + ), + ] : []), ], ), @@ -156,9 +170,10 @@ export namespace MigrateNestMethodProgrammer { (components: OpenApi.IComponents) => (importer: MigrateImportProgrammer) => (route: IMigrateRoute): ts.ParameterDeclaration[] => [ - ...route.parameters.map(({ key, schema: value }) => + ...route.parameters.map((p) => ts.factory.createParameterDeclaration( [ + ...writeExampleDecorators("Parameter")(importer)(p.parameter()), ts.factory.createDecorator( ts.factory.createCallExpression( ts.factory.createIdentifier( @@ -169,28 +184,36 @@ export namespace MigrateNestMethodProgrammer { }), ), undefined, - [ts.factory.createStringLiteral(key)], + [ts.factory.createStringLiteral(p.key)], ), ), ], undefined, - key, + p.key, undefined, - MigrateSchemaProgrammer.write(components)(importer)(value), + MigrateSchemaProgrammer.write(components)(importer)(p.schema), ), ), ...(route.headers ? [ writeDtoParameter({ method: "TypedHeaders", variable: "headers" })( components, - )(importer)(route.headers.schema), + )(importer)({ + schema: route.headers.schema, + example: route.headers.example(), + examples: route.headers.examples(), + }), ] : []), ...(route.query ? [ writeDtoParameter({ method: "TypedQuery", variable: "query" })( components, - )(importer)(route.query.schema), + )(importer)({ + schema: route.query.schema, + example: route.query.example(), + examples: route.query.examples(), + }), ] : []), ...(route.body @@ -208,7 +231,11 @@ export namespace MigrateNestMethodProgrammer { ? ["TypedFormData", "Body"] : "TypedBody", variable: "body", - })(components)(importer)(route.body.schema), + })(components)(importer)({ + schema: route.body.schema, + example: route.body.media().example, + examples: route.body.media().examples, + }), ] : []), ]; @@ -217,7 +244,11 @@ export namespace MigrateNestMethodProgrammer { (accessor: { method: string | [string, string]; variable: string }) => (components: OpenApi.IComponents) => (importer: MigrateImportProgrammer) => - (schema: OpenApi.IJsonSchema): ts.ParameterDeclaration => { + (props: { + schema: OpenApi.IJsonSchema; + example?: any; + examples?: Record; + }): ts.ParameterDeclaration => { const instance = ts.factory.createIdentifier( importer.external({ type: "instance", @@ -230,6 +261,7 @@ export namespace MigrateNestMethodProgrammer { ); return ts.factory.createParameterDeclaration( [ + ...writeExampleDecorators("Parameter")(importer)(props), ts.factory.createDecorator( ts.factory.createCallExpression( typeof accessor.method === "string" @@ -243,7 +275,55 @@ export namespace MigrateNestMethodProgrammer { undefined, accessor.variable, undefined, - MigrateSchemaProgrammer.write(components)(importer)(schema), + MigrateSchemaProgrammer.write(components)(importer)(props.schema), ); }; + + const writeExampleDecorators = + (kind: "Response" | "Parameter") => + (importer: MigrateImportProgrammer) => + (media: { + example?: any; + examples?: Record; + }): ts.Decorator[] => [ + ...(media.example !== undefined + ? [ + ts.factory.createDecorator( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier( + importer.external({ + type: "instance", + library: "@nestia/core", + name: "SwaggerExample", + }), + ), + )(kind), + [], + [LiteralFactory.generate(media.example)], + ), + ), + ] + : []), + ...Object.entries(media.examples ?? {}).map(([key, value]) => + ts.factory.createDecorator( + ts.factory.createCallExpression( + IdentifierFactory.access( + ts.factory.createIdentifier( + importer.external({ + type: "instance", + library: "@nestia/core", + name: "SwaggerExample", + }), + ), + )(kind), + [], + [ + ts.factory.createStringLiteral(key), + LiteralFactory.generate(value), + ], + ), + ), + ), + ]; } diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 250b6888c..6868e59dd 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.0", - "@nestia/core": "^3.7.0", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.0.tgz", + "@nestia/core": "../core/nestia-core-3.7.0.tgz", "@samchon/openapi": "^0.4.1", "cli": "^1.0.1", "get-function-location": "^2.0.0", diff --git a/website/build/typedoc.js b/website/build/typedoc.js index a1f991e13..58d73648f 100644 --- a/website/build/typedoc.js +++ b/website/build/typedoc.js @@ -1,19 +1,23 @@ const cp = require("child_process"); const fs = require("fs"); -const execute = (str) => { - cp.execSync(str, { cwd: `${__dirname}/..`, stdio: "ignore" }); -}; - for (const pack of ["benchmark", "core", "e2e", "fetcher"]) { - if (fs.existsSync(`../packages/${pack}/node_modules`) === false) - execute("npm install"); - execute( + const location = `${__dirname}/../../packages/${pack}`; + if (fs.existsSync(`${location}/node_modules`) === false) + cp.execSync("npm install", { cwd: location, stdio: "ignore" }); + cp.execSync( [ `npx typedoc --json typedoc-json/${pack}.json`, `--options ../packages/${pack}/typedoc.json`, `--validation.invalidLink false`, ].join(" "), + { + cwd: `${__dirname}/..`, + stdio: "ignore", + }, ); } -execute(`npx typedoc --entryPointStrategy merge "typedoc-json/*.json"`); +cp.execSync(`npx typedoc --entryPointStrategy merge "typedoc-json/*.json"`, { + cwd: `${__dirname}/..`, + stdio: "ignore", +}); diff --git a/website/package-lock.json b/website/package-lock.json index 7dcee5ed0..7cd245a5e 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -52,11 +52,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.8.tgz", + "integrity": "sha512-47DG+6F5SzOi0uEvK4wMShmn5yY0mVjVJoWTphdY2B4Rx9wHgjK7Yhtr0ru6nE+sn0v38mzrWOlah0p/YlHHOQ==", "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.24.8", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -123,9 +123,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "engines": { "node": ">=6.9.0" } @@ -153,9 +153,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", + "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", "bin": { "parser": "bin/babel-parser.js" }, @@ -164,9 +164,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", - "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.8.tgz", + "integrity": "sha512-5F7SDGs1T72ZczbRwbGO9lQi0NLjQxzl6i4lJxLxfW9U5UluCSyEJeniWvnhl3/euNiqQVbo8zruhsDfid0esA==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -188,18 +188,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz", + "integrity": "sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", + "@babel/generator": "^7.24.8", "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-function-name": "^7.24.7", "@babel/helper-hoist-variables": "^7.24.7", "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/parser": "^7.24.8", + "@babel/types": "^7.24.8", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -208,11 +208,11 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -387,26 +387,26 @@ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, "node_modules/@floating-ui/core": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.2.tgz", - "integrity": "sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.4.tgz", + "integrity": "sha512-a4IowK4QkXl4SCWTGUR0INAfEOX3wtsYw3rKK5InQEHMGObkR8Xk44qYQD9P4r6HHw0iIfK6GUKECmY8sTkqRA==", "dependencies": { - "@floating-ui/utils": "^0.2.0" + "@floating-ui/utils": "^0.2.4" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.5.tgz", - "integrity": "sha512-Nsdud2X65Dz+1RHjAIP0t8z5e2ff/IRbei6BqFrl1urT8sDVzM1HMQ+R0XcU5ceRfyO3I6ayeqIfh+6Wb8LGTw==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.7.tgz", + "integrity": "sha512-wmVfPG5o2xnKDU4jx/m4w5qva9FWHcnZ8BvzEe90D/RpwsJaTAVYPEPdQ8sbr/N8zZTAHlZUTQdqg8ZUbzHmng==", "dependencies": { - "@floating-ui/core": "^1.0.0", - "@floating-ui/utils": "^0.2.0" + "@floating-ui/core": "^1.6.0", + "@floating-ui/utils": "^0.2.4" } }, "node_modules/@floating-ui/react-dom": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.0.tgz", - "integrity": "sha512-lNzj5EQmEKn5FFKc04+zasr09h/uX8RtJRNj5gUXsSQIXHVWTVh+hVAg1vOMCexkX8EgvemMvIFpQfkosnVNyA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", + "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", "dependencies": { "@floating-ui/dom": "^1.0.0" }, @@ -416,9 +416,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", - "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.4.tgz", + "integrity": "sha512-dWO2pw8hhi+WrXq1YJy2yCuWoL20PddgGaqTgVe4cOS9Q6qklXCiA1tJEqX6BEwRNSCP84/afac9hd4MS+zEUA==" }, "node_modules/@headlessui/react": { "version": "1.7.19", @@ -562,9 +562,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -678,9 +678,9 @@ } }, "node_modules/@mui/core-downloads-tracker": { - "version": "5.15.19", - "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.19.tgz", - "integrity": "sha512-tCHSi/Tomez9ERynFhZRvFO6n9ATyrPs+2N80DMDzp6xDVirbBjEwhPcE+x7Lj+nwYw0SqFkOxyvMP0irnm55w==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-5.16.1.tgz", + "integrity": "sha512-62Jq7ACYi/55Kjkh/nVfEL3F3ytTYTsdB8MGJ9iI+eRQv+Aoem5CPUAzQihUo25qqh1VkVu9/jQn3dFbyrXHgw==", "funding": { "type": "opencollective", "url": "https://opencollective.com/mui-org" @@ -756,12 +756,12 @@ } }, "node_modules/@mui/private-theming": { - "version": "5.15.14", - "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.15.14.tgz", - "integrity": "sha512-UH0EiZckOWcxiXLX3Jbb0K7rC8mxTr9L9l6QhOZxYc4r8FHUkefltV9VDGLrzCaWh30SQiJvAEd7djX3XXY6Xw==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-5.16.1.tgz", + "integrity": "sha512-2EGCKnAlq9vRIFj61jNWNXlKAxXp56577OVvsts7fAqRx+G1y6F+N7Q198SBaz8jYQeGKSz8ZMXK/M3FqjdEyw==", "dependencies": { "@babel/runtime": "^7.23.9", - "@mui/utils": "^5.15.14", + "@mui/utils": "^5.16.1", "prop-types": "^15.8.1" }, "engines": { @@ -782,9 +782,9 @@ } }, "node_modules/@mui/styled-engine": { - "version": "5.15.14", - "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.15.14.tgz", - "integrity": "sha512-RILkuVD8gY6PvjZjqnWhz8fu68dVkqhM5+jYWfB5yhlSQKg+2rHkmEwm75XIeAqI3qwOndK6zELK5H6Zxn4NHw==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-5.16.1.tgz", + "integrity": "sha512-JwWUBaYR8HHCFefSeos0z6JoTbu0MnjAuNHu4QoDgPxl2EE70XH38CsKay66Iy0QkNWmGTRXVU2sVFgUOPL/Dw==", "dependencies": { "@babel/runtime": "^7.23.9", "@emotion/cache": "^11.11.0", @@ -852,9 +852,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.14", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.14.tgz", - "integrity": "sha512-MZsBZ4q4HfzBsywtXgM1Ksj6HDThtiwmOKUXH1pKYISI9gAVXCNHNpo7TlGoGrBaYWZTdNoirIN7JsQcQUjmQQ==", + "version": "7.2.15", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.15.tgz", + "integrity": "sha512-nbo7yPhtKJkdf9kcVOF8JZHPZTmqXjJ/tI0bdWgHg5tp9AnIN4Y7f7wm9T+0SyGYJk76+GYZ8Q5XaTYAsUHN0Q==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0" }, @@ -865,14 +865,14 @@ } }, "node_modules/@mui/utils": { - "version": "5.15.14", - "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.15.14.tgz", - "integrity": "sha512-0lF/7Hh/ezDv5X7Pry6enMsbYyGKjADzvHyo3Qrc/SSlTsQ1VkbDMbH0m2t3OR5iIVLwMoxwM7yGd+6FCMtTFA==", + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-5.16.1.tgz", + "integrity": "sha512-4UQzK46tAEYs2xZv79hRiIc3GxZScd00kGPDadNrGztAEZlmSaUY8cb9ITd2xCiTfzsx5AN6DH8aaQ8QEKJQeQ==", "dependencies": { "@babel/runtime": "^7.23.9", - "@types/prop-types": "^15.7.11", + "@types/prop-types": "^15.7.12", "prop-types": "^15.8.1", - "react-is": "^18.2.0" + "react-is": "^18.3.1" }, "engines": { "node": ">=12.0.0" @@ -1078,17 +1078,17 @@ } }, "node_modules/@nestia/migrate": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.14.1.tgz", - "integrity": "sha512-cVYCvr7tphehWTNctyR4Lir3x38iVEdQKaGUS9Q07hPSxq7mzkWDfkvKJPlPKgiFe7eWiJXTYIWVk6j/elI0UQ==", + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.14.3.tgz", + "integrity": "sha512-ld8BFWJVGYgH7hfCSCZdfjCnVF0FD9y5qZCQtKptnAXys8XsnJWkxYu2LnGK/urt6prcDT2ula3UfAbEjh0TBg==", "dependencies": { - "@samchon/openapi": "^0.3.0", + "@samchon/openapi": "^0.3.2", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.4.0" + "typia": "^6.4.3" }, "bin": { "migrate": "lib/executable/migrate.js" @@ -1294,15 +1294,27 @@ "integrity": "sha512-+HylYXGJVYKU7rkjpFr7HzPoNHs726pPRwjkyEbSEi9kRxFDS+CVYc448cLPZIjK03+7m4sd+ltk7k8uIBVFTA==" }, "node_modules/@shikijs/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.9.1.tgz", - "integrity": "sha512-EmUful2MQtY8KgCF1OkBtOuMcvaZEvmdubhW0UHCGXi21O9dRLeADVCj+k6ZS+de7Mz9d2qixOXJ+GLhcK3pXg==", - "dev": true + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.10.3.tgz", + "integrity": "sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==", + "dev": true, + "dependencies": { + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/core/node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } }, "node_modules/@stackblitz/sdk": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@stackblitz/sdk/-/sdk-1.10.0.tgz", - "integrity": "sha512-IcvE9Xifo2c4/f+yNqjFM/OW5VTBPLed3TxsQ+n8n81Py358IqD5w0IYfFgV5gbDjp2g5H5YK2/Shls/kQNTWQ==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@stackblitz/sdk/-/sdk-1.11.0.tgz", + "integrity": "sha512-DFQGANNkEZRzFk1/rDP6TcFdM82ycHE+zfl9C/M/jXlH68jiqHWHFMQURLELoD8koxvu/eW5uhg94NSAZlYrUQ==" }, "node_modules/@swc/helpers": { "version": "0.5.2", @@ -1313,11 +1325,11 @@ } }, "node_modules/@tanstack/react-virtual": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.5.1.tgz", - "integrity": "sha512-jIsuhfgy8GqA67PdWqg73ZB2LFE+HD9hjWL1L6ifEIZVyZVAKpYmgUG4WsKQ005aEyImJmbuimPiEvc57IY0Aw==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.8.3.tgz", + "integrity": "sha512-9ICwbDUUzN99CJIGc373i8NLoj6zFTKI2Hlcmo0+lCSAhPQ5mxq4dGOMKmLYoEFyHcGQ64Bd6ZVbnPpM6lNK5w==", "dependencies": { - "@tanstack/virtual-core": "3.5.1" + "@tanstack/virtual-core": "3.8.3" }, "funding": { "type": "github", @@ -1329,9 +1341,9 @@ } }, "node_modules/@tanstack/virtual-core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.5.1.tgz", - "integrity": "sha512-046+AUSiDru/V9pajE1du8WayvBKeCvJ2NmKPy/mR8/SbKKrqmSbj7LJBfXE+nSq4f5TBXvnCzu0kcYebI9WdQ==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.8.3.tgz", + "integrity": "sha512-vd2A2TnM5lbnWZnHi9B+L2gPtkSeOtJOAw358JqokIH1+v2J7vUAzFVPwB/wrye12RFOurffXu33plm4uQ+JBQ==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -1417,12 +1429,12 @@ } }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.8.tgz", + "integrity": "sha512-47DG+6F5SzOi0uEvK4wMShmn5yY0mVjVJoWTphdY2B4Rx9wHgjK7Yhtr0ru6nE+sn0v38mzrWOlah0p/YlHHOQ==", "dev": true, "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.24.8", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -1432,12 +1444,12 @@ } }, "node_modules/@trivago/prettier-plugin-sort-imports/node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", + "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -1615,9 +1627,9 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "bin": { "acorn": "bin/acorn" }, @@ -1875,9 +1887,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001628", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001628.tgz", - "integrity": "sha512-S3BnR4Kh26TBxbi5t5kpbcUlLJb9lhtDXISDPwOfI+JoC+ik0QksvkZtUVyikw3hjnkgkMPSJ8oIM9yMm9vflA==", + "version": "1.0.30001641", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz", + "integrity": "sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==", "funding": [ { "type": "opencollective", @@ -2144,9 +2156,9 @@ "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" }, "node_modules/cytoscape": { - "version": "3.29.2", - "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.29.2.tgz", - "integrity": "sha512-2G1ycU28Nh7OHT9rkXRLpCDP30MKH1dXJORZuBhtEhEW7pKwgPi77ImqlCWinouyE1PNepIOGZBOrE84DG7LyQ==", + "version": "3.30.0", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.30.0.tgz", + "integrity": "sha512-l590mjTHT6/Cbxp13dGPC2Y7VXdgc+rUeF8AnF/JPzhjNevbDJfObnJgaSjlldOgBQZbue+X6IUZ7r5GAgvauQ==", "engines": { "node": ">=0.10" } @@ -2668,9 +2680,10 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, "engines": { "node": ">=0.3.1" } @@ -2685,9 +2698,9 @@ } }, "node_modules/dompurify": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.5.tgz", - "integrity": "sha512-lwG+n5h8QNpxtyrJW/gJWckL+1/DQiYMX8f7t8Z2AZTPw1esVrqjI63i7Zc2Gz0aKzLVMYC1V1PL/ky+aY/NgA==" + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz", + "integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==" }, "node_modules/drange": { "version": "1.1.1", @@ -3027,9 +3040,9 @@ "integrity": "sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==" }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -3549,9 +3562,9 @@ } }, "node_modules/hast-util-raw": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.3.tgz", - "integrity": "sha512-ICWvVOF2fq4+7CMmtCPD5CM4QKjPbHpPotE6+8tDooV0ZuyJVUzHsrNX+O5NaRbieTf0F7FfeBOMAwi6Td0+yQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.0.4.tgz", + "integrity": "sha512-LHE65TD2YiNsHD3YuXcKPHXPLuYh/gjp12mOfU8jxSrm1f/yJpsb0F/KKljS6U9LJoP0Ux+tCe8iJ2AsPzTdgA==", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", @@ -3976,11 +3989,14 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4121,16 +4137,13 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" }, "node_modules/jackspeak": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.3.0.tgz", - "integrity": "sha512-glPiBfKguqA7v8JsXO3iLjJWZ9FV1vNpoI0I9hI9Mnk5yetO9uPLSpiCEmiVijAssv2f54HpvtzvAHfhPieiDQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -4177,9 +4190,9 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.3.1.tgz", + "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==" }, "node_modules/jsonfile": { "version": "4.0.0", @@ -4191,9 +4204,9 @@ } }, "node_modules/katex": { - "version": "0.16.10", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.10.tgz", - "integrity": "sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==", + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz", + "integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==", "funding": [ "https://opencollective.com/katex", "https://github.com/sponsors/katex" @@ -4801,9 +4814,9 @@ } }, "node_modules/mdast-util-to-hast": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.1.0.tgz", - "integrity": "sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.2.0.tgz", + "integrity": "sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==", "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", @@ -6306,6 +6319,12 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -6433,13 +6452,10 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", @@ -6546,9 +6562,9 @@ } }, "node_modules/prettier": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", - "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", "bin": { "prettier": "bin/prettier.cjs" }, @@ -7068,9 +7084,9 @@ } }, "node_modules/rimraf": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.7.tgz", - "integrity": "sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.9.tgz", + "integrity": "sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA==", "dev": true, "dependencies": { "glob": "^10.3.7" @@ -7079,7 +7095,7 @@ "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">=14.18" + "node": "14 >=14.20 || 16 >=16.20 || >=18" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -7095,31 +7111,29 @@ } }, "node_modules/rimraf/node_modules/glob": { - "version": "10.4.1", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", - "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rimraf/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -7719,15 +7733,6 @@ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/tslib": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", @@ -7750,15 +7755,15 @@ } }, "node_modules/typedoc": { - "version": "0.26.2", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.2.tgz", - "integrity": "sha512-q/t+M+PZqhN9gPWLBZ3CCvP+KT8O1tyYkSzEYbcQ6mo89avdIrMlBEl3vfo5BgSzwC6Lbmq0W64E8RkY+eVsLA==", + "version": "0.26.4", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.4.tgz", + "integrity": "sha512-FlW6HpvULDKgc3rK04V+nbFyXogPV88hurarDPOjuuB5HAwuAlrCMQ5NeH7Zt68a/ikOKu6Z/0hFXAeC9xPccQ==", "dev": true, "dependencies": { "lunr": "^2.3.9", "markdown-it": "^14.1.0", - "minimatch": "^9.0.4", - "shiki": "^1.9.0", + "minimatch": "^9.0.5", + "shiki": "^1.9.1", "yaml": "^2.4.5" }, "bin": { @@ -7771,6 +7776,15 @@ "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x" } }, + "node_modules/typedoc/node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/typedoc/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -7781,9 +7795,9 @@ } }, "node_modules/typedoc/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -7796,12 +7810,13 @@ } }, "node_modules/typedoc/node_modules/shiki": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.9.1.tgz", - "integrity": "sha512-8PDkgb5ja3nfujTjvC4VytL6wGOGCtFAClUb2r3QROevYXxcq+/shVJK5s6gy0HZnjaJgFxd6BpPqpRfqne5rA==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.10.3.tgz", + "integrity": "sha512-eneCLncGuvPdTutJuLyUGS8QNPAVFO5Trvld2wgEq1e002mwctAhJKeMGWtWVXOIEzmlcLRqcgPSorR6AVzOmQ==", "dev": true, "dependencies": { - "@shikijs/core": "1.9.1" + "@shikijs/core": "1.10.3", + "@types/hast": "^3.0.4" } }, "node_modules/typedoc/node_modules/yaml": { @@ -8126,6 +8141,14 @@ "node": ">=8" } }, + "node_modules/uvu/node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", diff --git a/website/package.json b/website/package.json index dbe6294b2..6eb8875e4 100644 --- a/website/package.json +++ b/website/package.json @@ -23,8 +23,8 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/migrate": "^0.14.1", - "@samchon/openapi": "^0.3.4", + "@nestia/migrate": "^0.15.0", + "@samchon/openapi": "^0.4.2", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -45,6 +45,6 @@ "rimraf": "^5.0.0", "ts-node": "^10.9.2", "typedoc": "^0.26.2", - "typescript": "^5.5.2" + "typescript": "^5.5.3" } } From be3d46e522d0ec57b1e3aab19f6e92db35b548bf Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 12 Jul 2024 22:23:03 +0900 Subject: [PATCH 024/204] Fix `@nestia/editor`'s mode bug --- website/package-lock.json | 29 ++++++++++------------- website/src/movies/editor/EditorMovie.tsx | 4 ++-- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 7cd245a5e..0a55b60b2 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -14,8 +14,8 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/migrate": "^0.14.1", - "@samchon/openapi": "^0.3.4", + "@nestia/migrate": "^0.15.0", + "@samchon/openapi": "^0.4.2", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", "next": "14.1.1", @@ -25,7 +25,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -36,7 +36,7 @@ "rimraf": "^5.0.0", "ts-node": "^10.9.2", "typedoc": "^0.26.2", - "typescript": "^5.5.2" + "typescript": "^5.5.3" } }, "node_modules/@babel/code-frame": { @@ -1078,17 +1078,17 @@ } }, "node_modules/@nestia/migrate": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.14.3.tgz", - "integrity": "sha512-ld8BFWJVGYgH7hfCSCZdfjCnVF0FD9y5qZCQtKptnAXys8XsnJWkxYu2LnGK/urt6prcDT2ula3UfAbEjh0TBg==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@nestia/migrate/-/migrate-0.15.0.tgz", + "integrity": "sha512-gfBpseFompXKexUhuvpq5jOdTbS2aRVedPjPBf76aJzE9GB1/wvAYmSSRiYgX79N7AOhMu3IP729f4UdgsLt7Q==", "dependencies": { - "@samchon/openapi": "^0.3.2", + "@samchon/openapi": "^0.4.2", "commander": "10.0.0", "inquirer": "8.2.5", "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.4.3" + "typia": "^6.5.0" }, "bin": { "migrate": "lib/executable/migrate.js" @@ -1289,9 +1289,9 @@ } }, "node_modules/@samchon/openapi": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.3.4.tgz", - "integrity": "sha512-+HylYXGJVYKU7rkjpFr7HzPoNHs726pPRwjkyEbSEi9kRxFDS+CVYc448cLPZIjK03+7m4sd+ltk7k8uIBVFTA==" + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.4.2.tgz", + "integrity": "sha512-lpL+HExpCH65EA8M4L0+bcC0T+0MQCaXjaHdmQ6oHQeSjTgS7ZyoA3l2B6FrkF6XA+mWosQhCmXH5t+VqmoGUQ==" }, "node_modules/@shikijs/core": { "version": "1.10.3", @@ -7861,11 +7861,6 @@ "typescript": ">=4.8.0 <5.6.0" } }, - "node_modules/typia/node_modules/@samchon/openapi": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@samchon/openapi/-/openapi-0.4.1.tgz", - "integrity": "sha512-2DS0dabVhNpJLqeEg0IRIfFePtBg9ZvxmPlZpqOkh+XuTmlK/I1re+KJpYLLsoncrzeEYUIPvqrFUqem63uJQA==" - }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", diff --git a/website/src/movies/editor/EditorMovie.tsx b/website/src/movies/editor/EditorMovie.tsx index ffcf87b6f..8db17b1b8 100644 --- a/website/src/movies/editor/EditorMovie.tsx +++ b/website/src/movies/editor/EditorMovie.tsx @@ -44,7 +44,7 @@ const EditorMovie = (props: { mode: "nest" | "sdk" }) => { setProgress(true); try { - await EditorComposer[props.mode]({ + await EditorComposer[mode]({ swagger, e2e, simulate, @@ -63,7 +63,7 @@ const EditorMovie = (props: { mode: "nest" | "sdk" }) => { Mode setMode(evt.target.value as "nest" | "sdk")} + onChange={(_e, value) => setMode(value as "nest" | "sdk")} style={{ paddingLeft: 15 }} > Date: Sat, 13 Jul 2024 03:09:45 +0900 Subject: [PATCH 025/204] Update `swagger.mdx` file and enhance mouse event of `@nestia/editor` links --- website/pages/docs/editor.mdx | 27 +++++++++---------- website/pages/docs/migrate.mdx | 42 ++++++++++++++---------------- website/pages/docs/sdk/swagger.mdx | 33 +++++++++++++++++------ 3 files changed, 58 insertions(+), 44 deletions(-) diff --git a/website/pages/docs/editor.mdx b/website/pages/docs/editor.mdx index af6b5c891..7d33cfbbe 100644 --- a/website/pages/docs/editor.mdx +++ b/website/pages/docs/editor.mdx @@ -27,27 +27,26 @@ Here are the some example projects generated by "TypeScript Swagger Editor". Tra {example.title}{": "} { + onMouseDown={(evt) => { + if (evt.which === 3) return; EditorComposer.sdk({ title: example.title, swagger: example.swagger, e2e: true, simulate: true, }).catch(() => {}); - }} - > SDK & Simulator + }}> SDK & Simulator {" / "} - { - EditorComposer.nest({ - title: example.title, - swagger: example.swagger, - e2e: true, - simulate: true, - }).catch(() => {}); - }} - > NestJS Project + { + if (evt.which === 3) return; + EditorComposer.nest({ + title: example.title, + swagger: example.swagger, + e2e: true, + simulate: true, + }).catch(() => {}); + }}> NestJS Project ))} diff --git a/website/pages/docs/migrate.mdx b/website/pages/docs/migrate.mdx index 5aa939f7a..82ea4b416 100644 --- a/website/pages/docs/migrate.mdx +++ b/website/pages/docs/migrate.mdx @@ -76,29 +76,27 @@ Then, you can test the migrated NestJS Project, SDK library and Mockup Simulator {EDITOR_EXAMPLES.map((example) => (
  • {example.title}{": "} - { - EditorComposer.nest({ - title: example.title, - swagger: example.swagger, - e2e: true, - simulate: true, - }).catch(() => {}); - }} - > NestJS Project + { + if (evt.which === 3) return; + EditorComposer.nest({ + title: example.title, + swagger: example.swagger, + e2e: true, + simulate: true, + }).catch(() => {}); + }}> NestJS Project {" / "} - { - EditorComposer.sdk({ - title: example.title, - swagger: example.swagger, - e2e: true, - simulate: true, - }).catch(() => {}); - }} - > SDK & Simulator + { + if (evt.which === 3) return; + EditorComposer.sdk({ + title: example.title, + swagger: example.swagger, + e2e: true, + simulate: true, + }).catch(() => {}); + }}> SDK & Simulator
  • ))} diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index fe2191c4d..dec0abcc3 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -1,5 +1,8 @@ import { Tabs, Tab } from 'nextra-theme-docs' +import { EditorComposer } from "../../../src/functional/EditorComposer"; +import { EDITOR_EXAMPLES } from "../../../src/constants/EDITOR_EXAMPLES"; + ## Outline @@ -728,12 +731,8 @@ export namespace INestiaConfig { Swagger generator fo `@nestia/sdk` supports some NestJS decorators. Here is the list of them. - `@nestjs/common` - - `@Get()`, `@Post()`, `@Put()`, `@Patch()`, `@Delete()`, ... - - `@Header()`, `@Headers()` - - `@Body()` + - `@Header()` - `@HttpCode()` - - `@Param()` - - `@Query()` - `@Version()` - `@nestjs/swagger` - `@ApiBasicAuth()` @@ -741,6 +740,9 @@ Swagger generator fo `@nestia/sdk` supports some NestJS decorators. Here is the - `@ApiOAuth2()` - `@ApiSecurity()` - `@ApiTags()` + - `@nestia/core` + - `@SwaggerExample.Response()` + - `@SwaggerExample.Parameter()` ### Controller Methods Swagger generator `@nestia/sdk` supports three type of comment tags for controller methods: @@ -1776,9 +1778,24 @@ You can choose two options for `swagger.json` file distribution. The 1st is publishing the `swagger.json` file in a public repo, and showing it through Swagger Editor like below: - - `samchon/bbs-backend`: [Swagger Editor](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsamchon%2Fbbs-backend%2Fmaster%2Fpackages%2Fapi%2Fswagger.json) - - `samchon/fake-iamport-server`: [Swagger Editor](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsamchon%2Fpayments%2Fmaster%2Fpackages%2Fiamport-server-api%2Fswagger.json) - - `samchon/fake-toss-payments-server`: [Swagger Editor](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsamchon%2Fpayments%2Fmaster%2Fpackages%2Ftoss-payments-server-api%2Fswagger.json) +{} The 2nd way is to hosting the `swagger.json` file in the NestJS backend server. From 3186a5f2f452236f91c5e5292d06c8538f4a757b Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sat, 13 Jul 2024 22:56:58 +0900 Subject: [PATCH 026/204] Add `swagger.openapi` configuration description on website documents --- packages/sdk/src/INestiaConfig.ts | 18 +------- website/pages/docs/sdk/e2e.mdx | 14 ++++++- website/pages/docs/sdk/sdk.mdx | 16 ++++++- website/pages/docs/sdk/simulator.mdx | 14 ++++++- website/pages/docs/sdk/swagger.mdx | 62 +++++++++++++++++++--------- 5 files changed, 84 insertions(+), 40 deletions(-) diff --git a/packages/sdk/src/INestiaConfig.ts b/packages/sdk/src/INestiaConfig.ts index 3f39dc76b..17c673a10 100644 --- a/packages/sdk/src/INestiaConfig.ts +++ b/packages/sdk/src/INestiaConfig.ts @@ -175,12 +175,12 @@ export namespace INestiaConfig { /** * OpenAPI version. - * + * * If you configure this property to be `2.0` or `3.0`, the newly generated * `swagger.json` file would follow the specified OpenAPI version. The newly * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 * specification by {@link OpenApi.downgrade} method. - * + * * @default 3.1 */ openapi?: "2.0" | "3.0" | "3.1"; @@ -196,20 +196,6 @@ export namespace INestiaConfig { */ beautify?: boolean | number; - /** - * Whether to include additional information or not. - * - * If configured to be `true`, those properties would be added into each - * API endpoinnt. - * - * - `x-nestia-method` - * - `x-nestia-namespace` - * ` `x-nestia-jsDocTags` - * - * @default false - */ - additional?: boolean; - /** * API information. * diff --git a/website/pages/docs/sdk/e2e.mdx b/website/pages/docs/sdk/e2e.mdx index 317691804..4fecfa388 100644 --- a/website/pages/docs/sdk/e2e.mdx +++ b/website/pages/docs/sdk/e2e.mdx @@ -274,6 +274,18 @@ export namespace INestiaConfig { */ output: string; + /** + * OpenAPI version. + * + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. + * + * @default 3.1 + */ + openapi?: "2.0" | "3.0" | "3.1"; + /** * API information. * @@ -359,7 +371,7 @@ By the way, `nestia.config.ts` supports alternative options specifying the targe 'Pattern', 'Exclude', ]} - defaultIndex={2}> + defaultIndex={3}> ```typescript copy filename="nestia.config.ts" showLineNumbers {7-15} import { INestiaConfig } from "@nestia/sdk"; diff --git a/website/pages/docs/sdk/sdk.mdx b/website/pages/docs/sdk/sdk.mdx index b7ef7183c..7ebc81d11 100644 --- a/website/pages/docs/sdk/sdk.mdx +++ b/website/pages/docs/sdk/sdk.mdx @@ -148,7 +148,7 @@ export default NESTIA_CONFIG; ``` -```typescript copy filename="INestiaConfig.ts" showLineNumbers {13-32} +```typescript copy filename="INestiaConfig.ts" showLineNumbers {10-29} import type { INestApplication } from "@nestjs/common"; import type { OpenApi } from "@samchon/openapi"; @@ -324,6 +324,18 @@ export namespace INestiaConfig { */ output: string; + /** + * OpenAPI version. + * + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. + * + * @default 3.1 + */ + openapi?: "2.0" | "3.0" | "3.1"; + /** * API information. * @@ -411,7 +423,7 @@ If your backend application server does not have special configuration like `set 'Pattern', 'Exclude', ]} - defaultIndex={2}> + defaultIndex={3}> ```typescript copy filename="nestia.config.ts" showLineNumbers {7-15} import { INestiaConfig } from "@nestia/sdk"; diff --git a/website/pages/docs/sdk/simulator.mdx b/website/pages/docs/sdk/simulator.mdx index e64280248..3eddb2ff0 100644 --- a/website/pages/docs/sdk/simulator.mdx +++ b/website/pages/docs/sdk/simulator.mdx @@ -347,6 +347,18 @@ export namespace INestiaConfig { */ output: string; + /** + * OpenAPI version. + * + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. + * + * @default 3.1 + */ + openapi?: "2.0" | "3.0" | "3.1"; + /** * API information. * @@ -436,7 +448,7 @@ By the way, `nestia.config.ts` supports alternative options specifying the targe 'Pattern', 'Exclude' ]} - defaultIndex={2}> + defaultIndex={3}> ```typescript copy filename="nestia.config.ts" showLineNumbers {7-15} import { INestiaConfig } from "@nestia/sdk"; diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index dec0abcc3..ba225ba83 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -25,6 +25,7 @@ const NESTIA_CONFIG: INestiaConfig = { return app; }, swagger: { + openapi: "3.1", output: "dist/swagger.json", beautify: true, security: { @@ -69,7 +70,7 @@ If you have a special configuration file that its file name is not `nestia.confi OpenApi.ISecuritySchema, ]}> -```typescript copy filename="nestia.config.ts" showLineNumbers {18-34} +```typescript copy filename="nestia.config.ts" showLineNumbers {18-35} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; // import { FastifyAdaptor } from "@nestjs/platform-fastify"; @@ -88,6 +89,7 @@ const NESTIA_CONFIG: INestiaConfig = { return app; }, swagger: { + openapi: "3.1", output: "dist/swagger.json", security: { bearer: { @@ -109,7 +111,7 @@ export default NESTIA_CONFIG; ``` -```typescript filename="INestiaConfig.ts" showLineNumbers {11-16, 163-244} +```typescript filename="INestiaConfig.ts" showLineNumbers {10-15, 163-256} import type { INestApplication } from "@nestjs/common"; import type { OpenApi } from "@samchon/openapi"; @@ -276,6 +278,18 @@ export namespace INestiaConfig { * Building `swagger.json` is also possible. */ export interface ISwaggerConfig { + /** + * OpenAPI version. + * + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. + * + * @default 3.1 + */ + openapi?: "2.0" | "3.0" | "3.1"; + /** * Output path of the `swagger.json`. * @@ -435,11 +449,12 @@ By the way, `nestia.config.ts` supports alternative options specifying the targe + defaultIndex={3}> ```typescript copy filename="nestia.config.ts" showLineNumbers {7-15} import { INestiaConfig } from "@nestia/sdk"; @@ -458,6 +473,7 @@ const NESTIA_CONFIG: INestiaConfig = { return app; }, swagger: { + openapi: "3.1", output: "dist/swagger.json", beautify: true, security: { @@ -497,6 +513,7 @@ const NESTIA_CONFIG: INestiaConfig = { return app; }, swagger: { + openapi: "3.1", output: "dist/swagger.json", beautify: true, security: { @@ -528,6 +545,7 @@ const NESTIA_CONFIG: INestiaConfig = { "src/test/controllers" ], swagger: { + openapi: "3.1", output: "dist/swagger.json", beautify: true, security: { @@ -555,6 +573,7 @@ import { INestiaConfig } from "@nestia/sdk"; const NESTIA_CONFIG: INestiaConfig = { input: "src/**/*.controller.ts", swagger: { + openapi: "3.1", output: "dist/swagger.json", beautify: true, security: { @@ -585,6 +604,7 @@ const NESTIA_CONFIG: INestiaConfig = { exclude: ["src/**/*.fake.ts"], }, swagger: { + openapi: "3.1", output: "dist/swagger.json", beautify: true, security: { @@ -609,6 +629,10 @@ export default NESTIA_CONFIG; Additionally, you can configure the `swagger` property in the `nestia.config.ts` file. + - `swagger.openapi`: OpenAPI version specification. + - `"2.0"` + - `"3.0"` + - `"3.1"` *(default)* - `swagger.beautify`: Whether to beautify JSON content or not. - `swagger.info`: API information. If not configured, `package.json` content be utilized instead. - `swagger.servers`: List of server addresses. @@ -620,7 +644,7 @@ Additionally, you can configure the `swagger` property in the `nestia.config.ts`
    See detailed options:
    -```typescript filename="INestiaConfig.ts" showLineNumbers {15-96} +```typescript filename="INestiaConfig.ts" showLineNumbers {15-108} export namespace INestiaConfig { /** * Building `swagger.json` is also possible. @@ -636,29 +660,27 @@ export namespace INestiaConfig { output: string; /** - * Whether to beautify JSON content or not. + * OpenAPI version. * - * If you configure this property to be `true`, the `swagger.json` file would - * be beautified with indentation (2 spaces) and line breaks. If you configure - * numeric value instead, the indentation would be specified by the number. + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. * - * @default false + * @default 3.1 */ - beautify?: boolean | number; + openapi?: "2.0" | "3.0" | "3.1"; /** - * Whether to include additional information or not. - * - * If configured to be `true`, those properties would be added into each - * API endpoinnt. + * Whether to beautify JSON content or not. * - * - `x-nestia-method` - * - `x-nestia-namespace` - * ` `x-nestia-jsDocTags` + * If you configure this property to be `true`, the `swagger.json` file would + * be beautified with indentation (2 spaces) and line breaks. If you configure + * numeric value instead, the indentation would be specified by the number. * * @default false */ - additional?: boolean; + beautify?: boolean | number; /** * API information. @@ -741,8 +763,8 @@ Swagger generator fo `@nestia/sdk` supports some NestJS decorators. Here is the - `@ApiSecurity()` - `@ApiTags()` - `@nestia/core` - - `@SwaggerExample.Response()` - `@SwaggerExample.Parameter()` + - `@SwaggerExample.Response()` ### Controller Methods Swagger generator `@nestia/sdk` supports three type of comment tags for controller methods: From 623d8f4fd5da9d67c8e41b3b21f88d62c99dc5b9 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sat, 13 Jul 2024 23:05:09 +0900 Subject: [PATCH 027/204] Restore additional property of swagger configuration. --- packages/sdk/src/INestiaConfig.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/sdk/src/INestiaConfig.ts b/packages/sdk/src/INestiaConfig.ts index 17c673a10..c7ea79497 100644 --- a/packages/sdk/src/INestiaConfig.ts +++ b/packages/sdk/src/INestiaConfig.ts @@ -196,6 +196,20 @@ export namespace INestiaConfig { */ beautify?: boolean | number; + /** + * Whether to include additional information or not. + * + * If configured to be `true`, those properties would be added into each + * API endpoinnt. + * + * - `x-nestia-method` + * - `x-nestia-namespace` + * ` `x-nestia-jsDocTags` + * + * @default false + */ + additional?: boolean; + /** * API information. * From 3562c083d5c1aec064ac28c09c0751996d8062be Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 14 Jul 2024 02:59:28 +0900 Subject: [PATCH 028/204] Upgrade sample swaggers --- website/public/swaggers/bbs.json | 71 +- website/public/swaggers/iamport.json | 18731 +++---------------- website/public/swaggers/shopping.json | 936 +- website/public/swaggers/toss-payments.json | 77 +- 4 files changed, 2755 insertions(+), 17060 deletions(-) diff --git a/website/public/swaggers/bbs.json b/website/public/swaggers/bbs.json index e51847b8d..638bdcf7c 100644 --- a/website/public/swaggers/bbs.json +++ b/website/public/swaggers/bbs.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.0.0", + "version": "3.0.2", "title": "@samchon/bbs-backend", "description": "Backend for bbs", "license": { @@ -125,8 +125,8 @@ "type": "string", "format": "uuid" }, - "description": "Target article's ", - "required": true + "required": true, + "description": " Target article's {@link IBbsArticle.id}" } ], "responses": { @@ -156,8 +156,8 @@ "type": "string", "format": "uuid" }, - "description": "Target article's ", - "required": true + "required": true, + "description": " Target article's {@link IBbsArticle.id}" } ], "requestBody": { @@ -198,8 +198,8 @@ "type": "string", "format": "uuid" }, - "description": "Target article's ", - "required": true + "required": true, + "description": " Target article's {@link IBbsArticle.id}" } ], "requestBody": { @@ -235,7 +235,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], @@ -277,8 +276,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged article's ", - "required": true + "required": true, + "description": " Belonged article's {@link IBbsArticle.id }" } ], "requestBody": { @@ -321,8 +320,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged article's ", - "required": true + "required": true, + "description": " Belonged article's {@link IBbsArticle.id }" }, { "name": "id", @@ -331,8 +330,8 @@ "type": "string", "format": "uuid" }, - "description": "Target comment's ", - "required": true + "required": true, + "description": " Target comment's {@link IBbsArticleComment.id}" } ], "responses": { @@ -362,8 +361,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged article's ", - "required": true + "required": true, + "description": " Belonged article's {@link IBbsArticle.id }" }, { "name": "id", @@ -372,8 +371,8 @@ "type": "string", "format": "uuid" }, - "description": "Target comment's ", - "required": true + "required": true, + "description": " Target comment's {@link IBbsArticleComment.id}" } ], "requestBody": { @@ -414,8 +413,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged article's ", - "required": true + "required": true, + "description": " Belonged article's {@link IBbsArticle.id }" }, { "name": "id", @@ -424,8 +423,8 @@ "type": "string", "format": "uuid" }, - "description": "Target comment's ", - "required": true + "required": true, + "description": " Target comment's {@link IBbsArticleComment.id}" } ], "requestBody": { @@ -877,6 +876,11 @@ "title": "Format of body", "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, "body": { "type": "string", "title": "Content body of article", @@ -889,20 +893,15 @@ }, "title": "List of attachment files", "description": "List of attachment files." - }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." } }, "required": [ "id", "created_at", "format", + "title", "body", - "files", - "title" + "files" ], "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." }, @@ -1269,6 +1268,11 @@ "title": "Format of body", "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + }, "body": { "type": "string", "title": "Content body of comment", @@ -1281,18 +1285,13 @@ }, "title": "List of attachment files", "description": "List of attachment files." - }, - "password": { - "type": "string", - "title": "Password for modification", - "description": "Password for modification." } }, "required": [ "format", + "password", "body", - "files", - "password" + "files" ] }, "IBbsArticleComment.IErase": { diff --git a/website/public/swaggers/iamport.json b/website/public/swaggers/iamport.json index 142e3bdb2..92f890981 100644 --- a/website/public/swaggers/iamport.json +++ b/website/public/swaggers/iamport.json @@ -2,110 +2,76 @@ "openapi": "3.1.0", "servers": [ { - "url": "http://localhost:37001", - "description": "Local Server" + "url": "http://localhost:10851", + "description": "fake" + }, + { + "url": "https://api.iamport.kr", + "description": "real" } ], "info": { - "version": "0.4.0", - "title": "@samchon/shopping-backend", - "description": "Backend for shopping", + "title": "Iamport API", + "description": "Built by [fake-iamport-server](https://github.com/samchon/payments/tree/master/packages/fake-iamport-server) with [nestia](https://github.com/samchon/nestia)", + "version": "8.1.0", "license": { "name": "MIT" } }, "paths": { - "/monitors/health": { - "get": { - "tags": [ - "Monitor" - ], - "parameters": [], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Health check API", - "description": "Health check API." - } - }, - "/monitors/performance": { + "/subscribe/customers/{customer_uid}": { "get": { - "tags": [ - "Monitor" - ], - "parameters": [], - "responses": { - "200": { - "description": "Performance info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPerformance" - } - } - } + "tags": [], + "parameters": [ + { + "name": "customer_uid", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": " 고객 (간편 결제 카드) 식별자 키" } - }, - "summary": "Get performance information", - "description": "Get performance information.\n\nGet perofmration information composed with CPU, memory and resource usage." - } - }, - "/monitors/system": { - "get": { - "tags": [ - "Monitor" ], - "parameters": [], "responses": { "200": { - "description": "System info", + "description": "간편 결제 카드 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ISystem" + "$ref": "#/components/schemas/IIamportResponseIIamportSubscription" } } } } }, - "summary": "Get system information", - "description": "Get system information.\n\nGet system information with commit and package information.\n\nAs such information is a type of sensitive, response be encrypted." - } - }, - "/shoppings/admins/authenticate": { - "get": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "responses": { - "200": { - "description": "Admin info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingAdministrator.IInvert" - } - } - } + "summary": "간편 결제 카드 정보 조회하기", + "description": "간편 결제 카드 정보 조회하기.\n\n`subscribe.customers.at` 은 고객이 {@link create} 나 혹은 아임포트가 제공하는\n간편 결제 카드 등록 창을 이용하여 저장한 간편 결제 카드 정보를 조회하는 API\n함수이다.", + "security": [ + { + "bearer": [] } - }, - "summary": "Get administrator information", - "description": "Get administrator information.\n\nGet {@link IShoppingAdministrator.IInvert administrator} information of\ncurrent {@link IShoppingCustomer customer}.\n\nIf current {@link IShoppingMember member} is not an administrator,\nit throws 403 forbidden exception." + ] }, "post": { - "tags": [ - "Authenticate" + "tags": [], + "parameters": [ + { + "name": "customer_uid", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": " 고객 (간편 결제 카드) 식별자 키" + } ], - "parameters": [], "requestBody": { - "description": "Joining request info", + "description": "카드 입력 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingAdministrator.IJoin" + "$ref": "#/components/schemas/IIamportSubscription.ICreate" } } }, @@ -113,65 +79,68 @@ }, "responses": { "201": { - "description": "Administrator info", + "description": "간편 결제 카드 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingAdministrator.IInvert" + "$ref": "#/components/schemas/IIamportResponseIIamportSubscription" } } } } }, - "summary": "Join as an administrator", - "description": "Join as an administrator.\n\nJoin as an administrator with {@link IShoppingAdministrator.IJoin joining info}.\n\nThis method is allowed only when the {@link IShoppingCustomer customer} already\nhas joined the {@link IShoppingMember membership}. IF not, he (she) must\naccomplish it before. If not, 403 forbidden exception would be thrown." - } - }, - "/shoppings/admins/authenticate/login": { - "put": { - "tags": [ - "Authenticate" + "summary": "간편 결제 카드 등록하기", + "description": "간편 결제 카드 등록하기.\n\n`subscribe.customers.stoer` 는 고객이 자신의 카드를 서버에 등록해두고, 매번 결제가\n필요할 때마다 카드 정보를 반복 입력하는 일 없이, 간편하게 결제를 진행하고자 할 때\n사용하는 API 함수이다.\n\n참고로 `subscribe.customers.create` 는 클라이언트 어플리케이션이 아임포트가 제공하는\n간편 결제 카드 등록 창을 사용하는 경우, 귀하의 백엔드 서버가 이를 실 서비스에서 호출하는\n일은 없을 것이다. 다만, 고객이 간편 결제 카드를 등록하는 상황을 시뮬레이션하기 위하여,\n테스트 자동화 프로그램 수준에서 사용될 수는 있다.", + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [], + "parameters": [ + { + "name": "customer_uid", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": " 고객 (간편 결제 카드) 식별자 키" + } ], - "parameters": [], - "requestBody": { - "description": "Login request info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMember.ILogin" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Administrator info", + "description": "삭제된 간편 결제 카드 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingAdministrator.IInvert" + "$ref": "#/components/schemas/IIamportResponseIIamportSubscription" } } } } }, - "summary": "Login as an administrator", - "description": "Login as an administrator.\n\nLogin as an administrator with {@link IShoppingAdministrator.ILogin login info}.\n\nThis method has exactly same effect with\n{@link ShoppingApi.functional.customers.authenticate.login} function, but\nreturned type is a llttle different. The similar function returns\n{@link IShoppingCustomer} type that starting from the customer information, so\nthat you have to access to the administrator info through\n`customer.member.administrator`. In contrast with that, this method returns\n{@link IShoppingAdministrator.IInvert} type that starting from the administrator\ninfo, so that can access to the customer info through `administrator.customer`.\n\nOf course, to use this function, you had to {@link join} as an administrator\nbefore. If not, 403 forbidden exception would be thrown," + "summary": "간편 결제 카드 삭제하기", + "description": "간편 결제 카드 삭제하기.\n\n간편 결제를 위하여 등록한 카드를 제거한다.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/coupons": { + "/subscribe/payments/onetime": { "post": { - "tags": [ - "Discount" - ], + "tags": [], "parameters": [], "requestBody": { - "description": "Creation info of the coupon", + "description": "카드 결제 신청 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingCoupon.ICreate" + "$ref": "#/components/schemas/IIamportSubscription.IOnetime" } } }, @@ -179,149 +148,185 @@ }, "responses": { "201": { - "description": "Newly created coupon", + "description": "카드 결제 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingCoupon" + "$ref": "#/components/schemas/IIamportResponseIIamportCardPayment" } } } } }, - "summary": "Create a new coupon", - "description": "Create a new coupon.\n\nCreate a new {@link IShoppingCoupon coupon} with given information.\n\nBy the way, if you are a {@link IShoppingSeller seller}, you have to\nadd include direction's {@link IShoppingCouponSellerCriteria} or\n{@link IShoppingCouponSaleCriteria} condition. This is because only\n{@link IShoppingAdministrator administrators} can create a coupon\nwhich can be used throughout the market. Seller must limit the usage\nrange by his/her {@link IShoppingSale sale(s)}.\n\nOf course, when adminstrator is planning to make a general coupon\nthat can be used throughout the market, the administrator must\nget agree from the sellers who are going to be affected." - }, - "patch": { - "tags": [ - "Discount" - ], + "summary": "카드로 결제하기, 더불어 간편 결제용으로 등록 가능", + "description": "카드로 결제하기, 더불어 간편 결제용으로 등록 가능.\n\n`subscribe.payments.onetime` 은 카드를 매개로 한 결제를 하고자 할 때 호출하는 API\n함수이다. 더하여 입력 값에 {@link IIamportSubscription.IOnetime.customer_uid} 를\n기입하는 경우, 결제에 사용한 카드를 그대로 간편 결제용 카드\n{@link IIamportSubscription} 로 등록해버린다.\n\n다만, 정히 간편 카드 등록과 결제를 동시에 하고 싶다면,\n`subscribe.payments.onetime` 에 {@link IIamportSubscription.IOnetime.customer_uid}\n를 더하기보다, {@link subscribe.customers.create} 와 {@link subscribe.payments.again}\n을 각각 호출하는 것을 권장한다. 그것이 예외적인 상황에 보다 안전하게 대처할 수 있기\n때문이다.\n\n더하여 `subscribe.payments.onetime` 은 클라이언트 어플리케이션이 아임포트가 제공하는\n결제 창을 그대로 사용하는 경우, 귀하의 백엔드 서버가 이를 실 서비스에서 호출하는 일은\n없을 것이다. 다만, 고객이 카드를 통하여 결제하는 상황을 시뮬레이션하기 위하여, 테스트\n자동화 프로그램 수준에서 사용될 수는 있다.", + "security": [ + { + "bearer": [] + } + ] + } + }, + "/subscribe/payments/again": { + "post": { + "tags": [], "parameters": [], "requestBody": { - "description": "Request info of pagination, searching and sorting", + "description": "미리 등록한 카드를 이용한 결제 신청 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingCoupon.IRequest" + "$ref": "#/components/schemas/IIamportSubscription.IAgain" } } }, "required": true }, "responses": { - "200": { - "description": "Paginated coupons", + "201": { + "description": "카드 결제 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPageIShoppingCoupon" + "$ref": "#/components/schemas/IIamportResponseIIamportCardPayment" } } } } }, - "summary": "List up every coupons", - "description": "List up every coupons.\n\nList up every {@link IShoppingCoupon coupons} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingCoupon.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingCoupon.IRequest.sort sort condition}.\n\nFor reference, if you are a {@link IShoppingCustomer customer}, then\nonly {@link IShoppingCouponTicket ticketable} coupons would be listed up.\nOtherwise, non-ticketable coupons would also be listed up." + "summary": "간편 결제에 등록된 카드로 결제하기", + "description": "간편 결제에 등록된 카드로 결제하기.\n\n`subscribe.payments.again` 은 고객이 간편 결제에 등록한 카드로 결제를 진행하고자 할 때\n호출하는 API 함수이다. 이는 간편하고 불편하고를 떠나, 본질적으로 카드 결제의 일환이기에,\n리턴값은 일반적인 카드 결제 때와 동일한 {@link IIamportCardPayment} 이다.\n\n그리고 `subscribe.payments.again` 은 결제 수단 중 유일하게, 클라이언트 어플리케이션이\n아임포트가 제공하는 결체 창을 사용할 수 없어, 오직 귀하의 백엔드 서버가 아임포트의 API\n함수를 직접 호출해야하는 경우에 해당한다. 따라서 간편 결제에 관하여 아임포트 서버와\n연동하는 백엔드 서버 및 프론트 어플리케이션을 개발할 때, 반드시 이 상황에 대한 별도의\n설계 및 개발이 필요하니, 이 점을 염두에 두기 바란다.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/coupons/{id}": { - "delete": { - "tags": [ - "Discount" - ], + "/certifications/{imp_uid}": { + "get": { + "tags": [], "parameters": [ { - "name": "id", + "name": "imp_uid", "in": "path", "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " 대상 본인인증 정보의 {@link IIamportCertification.imp_uid}" } ], "responses": { "200": { - "description": "" + "description": "본인인증 정보", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IIamportResponseIIamportCertification" + } + } + } } }, - "summary": "Erase a coupon", - "description": "Erase a coupon.\n\nErase a {@link IShoppingCoupon coupon} with given ID.\n\nFor reference, if there're some {@link IShoppingCouponTicket tickets}\nwhich are already issued from the target coupon, they would not be affected.\nThose tickets are still valid until their expration time." + "summary": "본인인증 정보 열람하기", + "description": "본인인증 정보 열람하기.\n\n`certiciations.at` 은 본인인증 정보를 열람할 때 사용하는 API 함수이다.\n\n다만 이 API 함수를 통하여 열람한 본인인증 정보 {@link IIamportCertification} 이\n곧 OTP 인증까지 마쳐 본인인증을 모두 마친 레코드라는 보장은 없다. 본인인증의 완결\n여부는 오직, {@link IIamportCertification.certified} 값을 직접 검사해봐야만 알\n수 있기 때문이다.", + "security": [ + { + "bearer": [] + } + ] }, - "get": { - "tags": [ - "Discount" - ], + "delete": { + "tags": [], "parameters": [ { - "name": "id", + "name": "imp_uid", "in": "path", "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " 대상 본인인증 정보의 {@link IIamportCertification.imp_uid}" } ], "responses": { "200": { - "description": "Coupon info", + "description": "삭제된 본인인증 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingCoupon" + "$ref": "#/components/schemas/IIamportResponseIIamportCertification" } } } } }, - "summary": "Get a coupon info", - "description": "Get a coupon info.\n\nGet a {@link IShoppingCoupon coupon} information.\n\nIf you are a {@link IShoppingCustomer customer}, then only\n{@link IShoppingCouponTicket ticketable} coupons are accessible. Non\nticketable coupons cause 410 gone error. Otherwise you are a\n{@link IShoppingSeller seller} or {@link IShoppingAdministrator administrator},\nnon-ticketable coupons are also accessible." + "summary": "본인인증 정보 삭제하기", + "description": "본인인증 정보 삭제하기.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/deposits": { - "patch": { - "tags": [ - "Discount" - ], + "/certifications/otp/request": { + "post": { + "tags": [], "parameters": [], "requestBody": { - "description": "Request info of pagination, searching and sorting", + "description": "본인인증 요청 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingDeposit.IRequest" + "$ref": "#/components/schemas/IIamportCertification.ICreate" } } }, "required": true }, "responses": { - "200": { - "description": "Paginated deposit metadata list", + "201": { + "description": "진행 중인 본인인증의 식별자 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPageIShoppingDeposit" + "$ref": "#/components/schemas/IIamportResponseIIamportCertification.IAccessor" } } } } }, - "summary": "Get deposit metadata list", - "description": "Get deposit metadata list.\n\nList up every {@link IShoppingDeposit deposit} metadata informations\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingDeposit.IRequest.search search condition} in the request body.\nAlso, it is possible to customize sequence order of records by configuring\n{@link IShoppingDeposit.IRequest.sort sort condition}." - }, + "summary": "본인인증 요청하기", + "description": "본인인증 요청하기.\n\n`certifications.otp.request` 는 아임포트 서버에 본인인증을 요청하는 API 함수이다.\n이 API 를 호출하면 본인인증 대상자의 핸드폰으로 OTP 문자가 전송되며, 본인인증\n대상자가 {@link certifications.otp.confirm} 을 통하여 이 OTP 번호를 정확히\n입력함으로써, 본인인증이 완결된다.\n\n또한 본인인증 대상자가 자신의 핸드폰으로 전송된 OTP 문자를 입력하기 전에도,\n여전히해당 본인인증 내역은 {@link certifications.at} 함수를 통하여 조회할 수 있다.\n다만, 이 때 리턴되는 {@link IIamportCertification} 에서 인증의 완결 여부를\n지칭하는 {@link IIamportCertification.certified} 값은 `false` 이다.", + "security": [ + { + "bearer": [] + } + ] + } + }, + "/certifications/otp/confirm/{imp_uid}": { "post": { - "tags": [ - "Discount" + "tags": [], + "parameters": [ + { + "name": "imp_uid", + "in": "path", + "schema": { + "type": "string" + }, + "required": true, + "description": " 대상 본인인증 정보의 {@link IIamportCertification.imp_uid}" + } ], - "parameters": [], "requestBody": { - "description": "Creation information of deposit metadata", + "description": "OTP 코드", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingDeposit.ICreate" + "$ref": "#/components/schemas/IIamportCertification.IConfirm" } } }, @@ -329,66 +334,61 @@ }, "responses": { "201": { - "description": "Newly created deposit metadata", + "description": "인증 완료된 본인인증 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingDeposit" + "$ref": "#/components/schemas/IIamportResponseIIamportCertification" } } } } }, - "summary": "Create a new deposit metadata", - "description": "Create a new deposit metadata.\n\nCreate a new {@link IShoppingDeposit deposit} metadata.\n\nThis action means that adding a new origin reason of deposit's income/outcome.\nOf course, creating a new deposit record does not mean that automatically\nincrease or decrease the {@link IShoppingCustomer customer}'s balance\nfollowing the record's reason why. The logic must be developed manually\nin the backend side." - } - }, - "/shoppings/admins/deposits/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ + "summary": "본인인증 시 발급된 OTP 코드 입력하기", + "description": "본인인증 시 발급된 OTP 코드 입력하기.\n\n`certifications.otp.confirm` 는 {@link certifications.otp.request} 를 통하여\n발급된 본인인증 건에 대하여, 본인인증 대상자의 휴대폰으로 전송된 OTP 번호를\n검증하고, 입력한 OTP 번호가 맞거든 해당 본인인증 건을 승인하여 완료 처리해주는\nAPI 함수이다.\n\n이처럼 본인인증을 완료하거든, 해당 본인인증 건 {@link IIamportCertification} 의\n{@link IIamportCertification.certified} 값이 비로소 `true` 로 변경되어,\n비로소 완결된다.", + "security": [ { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target deposit's ", - "required": true + "bearer": [] } - ], - "responses": { - "200": { - "description": "Deposit metadata", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeposit" - } + ] + } + }, + "/internal/webhook": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "description": "웹훅 이벤트 정보", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IIamportPayment.IWebhook" } } + }, + "required": true + }, + "responses": { + "201": { + "description": "" } }, - "summary": "Get a deposit metadata", - "description": "Get a deposit metadata.\n\nGet a {@link IShoppingDeposit deposit} metadata information with its ID." - }, - "delete": { - "tags": [ - "Discount" - ], + "summary": "웹훅 이벤트 더미 리스너", + "description": "웹훅 이벤트 더미 리스너.\n\n`internal.webhook` 은 실제 아임포트의 서버에는 존재하지 않는 API 로써,\n`fake-impoart-server` 의 {@link Configuration.WEBHOOK_URL} 에 아무런 URL 을 설정하지\n않으면, `fake-iamport-server` 로부터 발생하는 모든 종류의 웹훅 이벤트는 이 곳으로 전달되어\n무의미하게 사라진다.\n\n따라서 `fake-iamport-server` 를 사용하여 아임포트 서버와의 연동을 미리 검증코자 할 때는,\n반드시 {@link Configuration.WEBHOOK_URL} 를 설정하여 웹훅 이벤트가 귀하의 백엔드 서버로\n제대로 전달되도록 하자." + } + }, + "/internal/deposit/{imp_uid}": { + "put": { + "tags": [], "parameters": [ { - "name": "id", + "name": "imp_uid", "in": "path", "schema": { - "type": "string", - "format": "uuid" + "type": "string" }, - "description": "Target deposit's ", - "required": true + "required": true, + "description": " 대상 결제의 {@link IIamportVBankPayment.imp_uid }" } ], "responses": { @@ -396,85 +396,72 @@ "description": "" } }, - "summary": "Erase a deposit metadata", - "description": "Erase a deposit metadata.\n\nErase a {@link IShoppingDeposit deposit} metadata, so that no more\n{@link IShoppingCustomer customer}'s balance does not be increased or\ndecreased by the deposit's reason why." + "summary": "가상 계좌에 입금하기", + "description": "가상 계좌에 입금하기.\n\n`internal.deposit` 은 실제 아임포트 결제 서버에는 존재하지 않는 API 로써, 가상 계좌\n결제를 신청한 고객이, 이후 가상 계좌에 목표 금액을 입금하는 상황을 시뮬레이션 할 수 있는\n함수이다.\n\n즉, `internal.deposit` 는 고객이 스스로에게 가상으로 발급된 계좌에 입금을 하고, 그에 따라\n아임포트 서버에서 webhook 이벤트가 발생, 이를 귀하의 백엔드 서버로 전송하는 일련의 상황을\n시뮬레이션하기 위하여 설계된 테스트 함수다.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/deposits/{code}/get": { + "/payments/{imp_uid}": { "get": { - "tags": [ - "Discount" - ], + "tags": [], "parameters": [ { - "name": "code", + "name": "imp_uid", "in": "path", "schema": { "type": "string" }, - "description": "", - "required": true + "required": true, + "description": " 대상 결제 기록의 {@link IIamportPayment.imp_uid}" + }, + { + "name": "extension", + "in": "query", + "schema": { + "type": "boolean", + "title": "페이팔의 경우, 이 값을 `true` 로 할 것", + "description": "페이팔의 경우, 이 값을 `true` 로 할 것." + }, + "required": false, + "title": "페이팔의 경우, 이 값을 `true` 로 할 것", + "description": "페이팔의 경우, 이 값을 `true` 로 할 것." } ], "responses": { "200": { - "description": "Deposit metadata", + "description": "결제 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingDeposit" + "$ref": "#/components/schemas/IIamportResponseIIamportPayment" } } } } }, - "summary": "Get a deposit metadata by its code", - "description": "Get a deposit metadata by its code.\n\nGet a {@link IShoppingDeposit deposit} metadata information with its code." + "summary": "결제 기록 열람하기", + "description": "결제 기록 열람하기.\n\n아임포트를 통하여 발생한 결제 기록을 열람한다.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/mileages": { - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMileage.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated mileage metadata list", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingMileage" - } - } - } - } - }, - "summary": "Get mileage metadata list", - "description": "Get mileage metadata list.\n\nList up every {@link IShoppingMileage mileage} metadata informations\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingMileage.IRequest.search search condition} in the request body.\nAlso, it is possible to customize sequence order of records by configuring\n{@link IShoppingMileage.IRequest.sort sort condition}." - }, + "/payments/cancel": { "post": { - "tags": [ - "Discount" - ], + "tags": [], "parameters": [], "requestBody": { - "description": "Creation information of mileage metadata", + "description": "결제 취소 입력 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingMileage.ICreate" + "$ref": "#/components/schemas/IIamportPaymentCancel.ICreate" } } }, @@ -482,152 +469,178 @@ }, "responses": { "201": { - "description": "Newly created mileage metadata", + "description": "취소된 결제 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingMileage" + "$ref": "#/components/schemas/IIamportResponseIIamportPayment" } } } } }, - "summary": "Create a new mileage metadata", - "description": "Create a new mileage metadata.\n\nCreate a new {@link IShoppingMileage mileage} metadata.\n\nThis action means that adding a new origin reason of mileage's income/outcome.\nOf course, creating a new mileage record does not mean that automatically\nincrease or decrease the {@link IShoppingCustomer customer}'s balance\nfollowing the record's reason why. The logic must be developed manually\nin the backend side." + "summary": "결제 취소하기", + "description": "결제 취소하기.\n\n만약 가상 계좌를 통한 결제였다면, 반드시 환불 계좌 정보를 입력해줘야 한다.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/mileages/{id}": { + "/receipts/{imp_uid}": { "get": { - "tags": [ - "Discount" - ], + "tags": [], "parameters": [ { - "name": "id", + "name": "imp_uid", "in": "path", "schema": { - "type": "string", - "format": "uuid" + "type": "string" }, - "description": "Target mileage's ", - "required": true + "required": true, + "description": " 귀속 결제의 {@link IIamportPayment.imp_uid}" } ], "responses": { "200": { - "description": "Mileage metadata", + "description": "현금 영수증 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingMileage" + "$ref": "#/components/schemas/IIamportResponseIIamportReceipt" } } } } }, - "summary": "Get a mileage metadata", - "description": "Get a mileage metadata.\n\nGet a {@link IShoppingMileage mileage} metadata information with its ID." + "summary": "현금 영수증 조회하기", + "description": "현금 영수증 조회하기.", + "security": [ + { + "bearer": [] + } + ] }, - "delete": { - "tags": [ - "Discount" - ], + "post": { + "tags": [], "parameters": [ { - "name": "id", + "name": "imp_uid", "in": "path", "schema": { - "type": "string", - "format": "uuid" + "type": "string" }, - "description": "Target mileage's ", - "required": true + "required": true, + "description": " 귀속 결제의 {@link IIamportPayment.imp_uid}" } ], + "requestBody": { + "description": "현금 영수증 입력 정보", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IIamportReceipt.ICreate" + } + } + }, + "required": true + }, "responses": { - "200": { - "description": "" + "201": { + "description": "현금 영수증 정보", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IIamportResponseIIamportReceipt" + } + } + } } }, - "summary": "Erase a mileage metadata", - "description": "Erase a mileage metadata.\n\nErase a {@link IShoppingMileage mileage} metadata, so that no more\n{@link IShoppingCustomer customer}'s balance does not be increased or\ndecreased by the mileage's reason why." - } - }, - "/shoppings/admins/mileages/{code}/get": { - "get": { - "tags": [ - "Discount" - ], + "summary": "현금 영수증 발행하기", + "description": "현금 영수증 발행하기.", + "security": [ + { + "bearer": [] + } + ] + }, + "delete": { + "tags": [], "parameters": [ { - "name": "code", + "name": "imp_uid", "in": "path", "schema": { "type": "string" }, - "description": "", - "required": true + "required": true, + "description": " 귀속 결제의 {@link IIamportPayment.imp_uid}" } ], "responses": { "200": { - "description": "Mileage metadata", + "description": "취소된 현금 영수증 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingMileage" + "$ref": "#/components/schemas/IIamportResponseIIamportReceipt" } } } } }, - "summary": "Get a mileage metadata by its code", - "description": "Get a mileage metadata by its code.\n\nGet a {@link IShoppingMileage mileage} metadata information with its code." + "summary": "현금 영수증 취소하기", + "description": "현금 영수증 취소하기.", + "security": [ + { + "bearer": [] + } + ] } }, - "/shoppings/admins/mileages/donations": { - "patch": { - "tags": [ - "Discount" - ], + "/users/getToken": { + "post": { + "tags": [], "parameters": [], "requestBody": { - "description": "Request info of pagination, searching and sorting", + "description": "아임포트의 API 및 secret 키 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingMileageDonation.IRequest" + "$ref": "#/components/schemas/IIamportUser.IAccessor" } } }, "required": true }, "responses": { - "200": { - "description": "Paginated mileage donation history list", + "201": { + "description": "유저 인증 토큰 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPageIShoppingMileageDonation" + "$ref": "#/components/schemas/IIamportResponseIIamportUser" } } } } }, - "summary": "List up every mileage donation histories", - "description": "List up every mileage donation histories.\n\nList up every {@link IShoppingMileageDonation mileage donation histories}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingMileageDonation.IRequest.search search condition} in\nthe request body. Also, it is possible to customize sequence order of\nrecords by configuring {@link IShoppingMileageDonation.IRequest.sort sort}." - }, + "summary": "유저 인증 토큰 발행하기", + "description": "유저 인증 토큰 발행하기.\n\n아임포트에 가입하여 부여받은 API 및 secret 키를 토대로, 유저 인증 토큰을 발행한다.\n\n단, 아임포트가 발급해주는 유저 인증 토큰에는 유효 시간 {@link IIamportUser.expired_at}\n이 있어, 해당 시간이 지나거든 기 발급 토큰이 만료되어 더 이상 쓸 수 없게 된다. 때문에\n아임포트의 이러한 시간 제한에 구애받지 않고 자유로이 아임포트의 API 를 이용하고 싶다면,\n`iamport-server-api` 에서 제공해주는 {@link IamportConnector} 를 활용하도록 하자." + } + }, + "/vbanks": { "post": { - "tags": [ - "Discount" - ], + "tags": [], "parameters": [], "requestBody": { - "description": "Request info of mileage donation", + "description": "가상 계좌 입력 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingMileageDonation.ICreate" + "$ref": "#/components/schemas/IIamportVBankPayment.ICreate" } } }, @@ -635,131 +648,33 @@ }, "responses": { "201": { - "description": "Mileage donation history", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMileageDonation" - } - } - } - } - }, - "summary": "Donate a mileage to a citizen", - "description": "Donate a mileage to a citizen.\n\nDonate a mileage to a specific {@link IShoppingCitizen citizen} from\ncurrent {@link IShoppingAdministrator administrator}, with detailed\nreason why.\n\nNote that, as donating mileage affects to the citizen's balance and\ncurrent shopping mall's operating profit, administrator must archive\nthe detailed reason why the mileage is donated." - } - }, - "/shoppings/admins/mileages/donations/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target history's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Mileage donation history", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMileageDonation" - } - } - } - } - }, - "summary": "Get a mileage donation history", - "description": "Get a mileage donation history.\n\nGet a {@link IShoppingMileageDonation mileage donation history} with its ID." - } - }, - "/shoppings/admins/orders": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated orders", + "description": "가상 계좌 결제 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPageIShoppingOrder" + "$ref": "#/components/schemas/IIamportResponseIIamportVBankPayment" } } } } }, - "summary": "List up every orders", - "description": "List up every orders.\n\nList up every {@link IShoppingOrder orders} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingOrder.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingOrder.IRequest.sort sort condition}.\n\nFor reference, if you are a {@link IShoppingCustomer customer}, then\nyou can list up your own orders, and it is not a matter whether the\norder has been {@link IShoppingOrderPublish.paid_at paid} or not.\n\nOtherwise you are a {@link IShoppingSeller seller} or\n{@link IShoppingAdministrator administrator}, then you can list up\nonly paid orders. Also, in the seller case, only related\n{@link IShoppingOrder.goods goods} would be listed up in the order." - } - }, - "/shoppings/admins/orders/{id}": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ + "summary": "가상 계좌 발급하기", + "description": "가상 계좌 발급하기.", + "security": [ { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Order info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder" - } - } - } + "bearer": [] } - }, - "summary": "Get an order info", - "description": "Get an order info.\n\nGet a detailed {@link IShoppingOrder order} information.\n\nIf you are not a {@link IShoppingCustomer customer}, then you can't\naccess to the order which has not been\n{@link IShoppingOrderPublish.paid_at paid} yet. In that case,\n404 not found error would be thrown." - } - }, - "/shoppings/admins/sales": { - "patch": { - "tags": [ - "Sale" - ], + ] + }, + "put": { + "tags": [], "parameters": [], "requestBody": { - "description": "Request info of pagination, searching and sorting", + "description": "가상 계좌 편집 입력 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IShoppingSale.IRequest" + "$ref": "#/components/schemas/IIamportVBankPayment.IUpdate" } } }, @@ -767,15495 +682,1323 @@ }, "responses": { "200": { - "description": "Paginated sales with summarized information", + "description": "편집된 가상 계좌 결제 정보", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPageIShoppingSale.ISummary" + "$ref": "#/components/schemas/IIamportResponseIIamportVBankPayment" } } } } }, - "summary": "List up every summarized sales", - "description": "List up every summarized sales.\n\nList up every {@link IShoppingSale.ISummary summarized sales}.\n\nAs you can see, returned sales are summarized, not detailed. If you want\nto get the detailed information of a sale, use {@link at} function for\neach sale.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}s. Otherwise you're a\n{@link IShoppingCustomer customer}, you can see only the operating\nsales in the market. You can't see the unopened, closed, or suspended\nsales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSale.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingSale.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/sales/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ + "summary": "가상 계좌 편집하기", + "description": "가상 계좌 편집하기.", + "security": [ { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed sale information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } + "bearer": [] } - }, - "summary": "Get a sale info", - "description": "Get a sale info.\n\nGet a {@link IShoppingSale sale} with detailed information.\n\nIf you're a {@link IShoppingSeller seller}, you can only access to the\nyour own {@link IShoppingSale sale}. Otherwise you're a\n{@link IShoppingCustomer customer}, you can access to only the operating\nsales in the market. You can't access to the unopened, closed, or suspended\nsales." + ] } - }, - "/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated inquiry comments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "List up every inquiry comments", - "description": "List up every inquiry comments.\n\nList up every {@link IShoppingSaleInquiryComment inquiry comments} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleInquiryComment.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleInquiryComment.IRequest.sort sort condition}.\n\nBy the way, if you're a {@link IShoppingSeller seller}, you can only access\nto the your own {@link IShoppingSale sale}'s inquiries. Otherwise, you\ncan access to every inquiries of the sales." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true + } + }, + "components": { + "schemas": { + "IIamportResponseIIamportSubscription": { + "type": "object", + "properties": { + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } + "message": { + "type": "string", + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } + "response": { + "$ref": "#/components/schemas/IIamportSubscription", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, - "summary": "Create an inquiry comment", - "description": "Create an inquiry comment.\n\nCreate an {@link IShoppingSaleInquiryComment inquiry comment} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\ncreate an inquiry comment to your own {@link IShoppingSale sale}'s inquiry.\nOtherwise, you can create an inquiry comment to every inquiries of the sales." - } - }, - "/shoppings/admins/sales/{saleId}/questions/{inquiryId}/comments/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } + "required": [ + "code", + "message", + "response" ], - "responses": { - "200": { - "description": "Detailed inquiry comment info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Get an inquiry comment info", - "description": "Get an inquiry comment info.\n\nGet a detailed {@link IShoppingSaleInquiryComment inquiry comment}\ninformation of a {@link IShoppingSaleQuestion question} or\n{@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s inquiry comment.\nOtherwise, you can access to every inquiry comments of the sales." + "description": "아임포트 고유의 응답 데이터." }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true + "IIamportSubscription": { + "type": "object", + "properties": { + "pg_provider": { + "type": "string" }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } + "pg_id": { + "type": "string" }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ISnapshot" - } - } - } - } - }, - "summary": "Update an inquiry comment", - "description": "Update an inquiry comment.\n\nUpdate an {@link IShoppingSaleInquiryComment inquiry comment} to a specific\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nBy the way, as is the general policy of this shopping mall regarding\ncomments, modifying a comment does not actually change the existing content.\nModified content is accumulated and recorded in the existing comment record\nas a new {@link IShoppingSaleInquiryComment.ISnapshot snapshot}. And this\nis made public to everyone, who can read this inquiry comment.\n\nThis is to prevent customers or sellers from modifying their comments and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/admins/sales/{saleId}/questions": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IRequest" - } - } + "card_name": { + "type": "string" }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated questions with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleQuestion.ISummary" - } - } - } - } - }, - "summary": "List up every summarized questions", - "description": "List up every summarized questions.\n\nList up every {@link IShoppingSaleQuestion.ISummary summarized questions} of a\n{@link IShoppingSale sale}.\n\nAs you can see, returned questions are summarized, not detailed. If you want\nto get the detailed information of a question, use {@link adridges} function\nor {@link at} function for each article.\n\nAlso, returned question has {@link IShoppingSaleQuestion.ISummary.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\nAdditionally, returned question has another special property\n{@link IShoppingSaleQuestion.ISummary.secret} with masking to other\nprincple properties, and it means only related actors can {@link at read}\nthe question.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s questions. Otherwise,\nyou can access to every questions of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleQuestion.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleQuestion.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/sales/{saleId}/questions/abridges": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated questions with abridged information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleQuestion.IAbridge" - } - } - } - } - }, - "summary": "List up every abridged questions", - "description": "List up every abridged questions.\n\nList up every {@link IShoppingSaleQuestion.IAbridge abridged questions} of\na {@link IShoppingSale sale}.\n\nAs you can see, returned questions are abridged, not detailed. If you want\nto get the detailed information of a question, use {@link at} function\nfor each article.\n\nAlso, returned question has {@link IShoppingSaleQuestion.IAridge.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\nAdditionally, returned question has another special property\n{@link IShoppingSaleQuestion.IAridge.secret} with masking to other\nprincple properties, and it means only related actors can {@link at read}\nthe question.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s questions. Otherwise,\nyou can access to every questions of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleQuestion.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleQuestion.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/sales/{saleId}/questions/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target question's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed question info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion" - } - } - } - } - }, - "summary": "Get a question info", - "description": "Get a question info.\n\nGet a detailed {@link IShoppingSaleQuestion question} information of a\n{@link IShoppingSale sale}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s question. Otherwise\nyou are a {@link IShoppingCustomer customer}, you can access to every\nquestions of the sales except the {@link IShoppingSaleQuestion.secret}\nvalue is `false`." - } - }, - "/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated inquiry comments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "List up every inquiry comments", - "description": "List up every inquiry comments.\n\nList up every {@link IShoppingSaleInquiryComment inquiry comments} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleInquiryComment.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleInquiryComment.IRequest.sort sort condition}.\n\nBy the way, if you're a {@link IShoppingSeller seller}, you can only access\nto the your own {@link IShoppingSale sale}'s inquiries. Otherwise, you\ncan access to every inquiries of the sales." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Create an inquiry comment", - "description": "Create an inquiry comment.\n\nCreate an {@link IShoppingSaleInquiryComment inquiry comment} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\ncreate an inquiry comment to your own {@link IShoppingSale sale}'s inquiry.\nOtherwise, you can create an inquiry comment to every inquiries of the sales." - } - }, - "/shoppings/admins/sales/{saleId}/reviews/{inquiryId}/comments/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed inquiry comment info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Get an inquiry comment info", - "description": "Get an inquiry comment info.\n\nGet a detailed {@link IShoppingSaleInquiryComment inquiry comment}\ninformation of a {@link IShoppingSaleQuestion question} or\n{@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s inquiry comment.\nOtherwise, you can access to every inquiry comments of the sales." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ISnapshot" - } - } - } - } - }, - "summary": "Update an inquiry comment", - "description": "Update an inquiry comment.\n\nUpdate an {@link IShoppingSaleInquiryComment inquiry comment} to a specific\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nBy the way, as is the general policy of this shopping mall regarding\ncomments, modifying a comment does not actually change the existing content.\nModified content is accumulated and recorded in the existing comment record\nas a new {@link IShoppingSaleInquiryComment.ISnapshot snapshot}. And this\nis made public to everyone, who can read this inquiry comment.\n\nThis is to prevent customers or sellers from modifying their comments and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/admins/sales/{saleId}/reviews": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated reviews with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleReview.ISummary" - } - } - } - } - }, - "summary": "List up every summarized reviews", - "description": "List up every summarized reviews.\n\nList up every {@link IShoppingSaleReview.ISummary summarized reviews} of a\n{@link IShoppingSale sale}.\n\nAs you can see, returned reviews are summarized, not detailed. If you want\nto get the detailed information of a review, use {@link adridges} function\nor {@link at} function for each article.\n\nAlso, returned review has {@link IShoppingSaleReview.ISummary.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s reviews. Otherwise,\nyou can access to every reviews of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleReview.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleReview.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/sales/{saleId}/reviews/abridges": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated reviews with abridged information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleReview.IAbridge" - } - } - } - } - }, - "summary": "List up every abridged reviews", - "description": "List up every abridged reviews.\n\nList up every {@link IShoppingSaleReview.IAbridge abridged reviews} of\na {@link IShoppingSale sale}.\n\nAs you can see, returned reviews are abridged, not detailed. If you want\nto get the detailed information of a review, use {@link at} function\nfor each article.\n\nAlso, returned review has {@link IShoppingSaleReview.IAridge.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s reviews. Otherwise,\nyou can access to every reviews of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleReview.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleReview.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/sales/{saleId}/reviews/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target review's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed review info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview" - } - } - } - } - }, - "summary": "Get a review info", - "description": "Get a review info.\n\nGet a detailed {@link IShoppingSaleReview review} information of a\n{@link IShoppingSale sale}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s review. Otherwise\nyou are a {@link IShoppingCustomer customer}, you can access to every\nreviews of the sales." - } - }, - "/shoppings/admins/sales/{saleId}/snapshots": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "requestBody": { - "description": "Requestion info of pagination", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPage.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated snapshots with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleSnapshot.ISummary" - } - } - } - } - }, - "summary": "List up every snapshots", - "description": "List up every snapshots.\n\nWhenever {@link IShoppingSeller seller} updates a\n{@link IShoppingSale sale}, the sale record is not updated but a new\n{@link IShoppingSaleSnapshot snapshot} record is created to keep the\nintegrity of the sale history. This API function is for listing up\nsuch snapshot records.\n\nAlso, as you can see from the return type, returned snapshots are\nsummarized, not detailed. If you want to get the detailed information\nof a snapshot, use {@link at} or {@link flipo} function for each snapshot.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s snapshots. Otherwise,\nyou can access to every snapshots of the sales even though the sale has\nbeen closed or suspended." - } - }, - "/shoppings/admins/sales/{saleId}/snapshots/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed information of the snapshot", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleSnapshot" - } - } - } - } - }, - "summary": "Get a snapshot info", - "description": "Get a snapshot info.\n\nGet a {@link IShoppingSaleSnapshot snapshot} with detailed information.\n\nAs you can see from the return type, returned snapshot does not contain\nthe {@link IShoppingSale sale} info. If you want to get the sale info,\nuse the {@link flip} function instead.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s snapshots. Otherwise,\nyou can access to every snapshots of the sales even though the sale has\nbeen closed or suspended." - } - }, - "/shoppings/admins/sales/{saleId}/snapshots/{id}/flip": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed sale information in the snapshot side", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Get a flipped snapshot info", - "description": "Get a flipped snapshot info.\n\nGet a {@link IShoppingSale sale} info of a flipped snapshot.\n\nAs you can see from the return type, this function returns the\n{@link IShoppingSale sale} info. By the way, the sale info is not the\nlatest one, but a flipped info in the snapshot side.\n\nAlso, if you're a {@link IShoppingSeller seller}, you can only access to\nthe your own {@link IShoppingSale sale}'s snapshots. Otherwise, you can\naccess to every snapshots of the sales even though the sale has been\nclosed or suspended." - } - }, - "/shoppings/admins/systematic/channels/{channelCode}/categories": { - "post": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the category", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created category", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory" - } - } - } - } - }, - "summary": "Create a new category", - "description": "Create a new category.\n\nCreate a new {@link IShoppingChannelCategory category} of a\n{@link IShoppingChannel channel} with given name. If required, it is\npossible to specify the parent category by its ID." - }, - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Paginated categories with children categories", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IHierarchical" - } - } - } - } - } - }, - "summary": "List up every categories with children records", - "description": "List up every categories with children records.\n\nList up every {@link IShoppingChannelCategory.IHierarchical categories}\nof a {@link IShoppingChannel channel} with pagination. Returned categories\ncontain children categories, too.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannelCategory.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingChannelCategory.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/systematic/channels/{channelCode}/categories/{id}": { - "put": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target category's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the category", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Update a category", - "description": "Update a category.\n\nUpdate a {@link IShoppingChannelCategory category}'s name. If required,\nit is possible to change the parent category by its ID. Of course, detaching\nfrom the parent category so that becoming the root category is also possible." - }, - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target category's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed category info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory" - } - } - } - } - }, - "summary": "Get a category info", - "description": "Get a category info.\n\nGet a detailed {@link IShoppingChannelCategory category} information.\n\nReturned category contains hierarchical children categories, and also\ncontains the recursive parent categories, too." - } - }, - "/shoppings/admins/systematic/channels/{channelCode}/categories/merge": { - "delete": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - } - ], - "requestBody": { - "description": "Merge info of the categories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IRecordMerge" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Merge multiple categories into one", - "description": "Merge multiple categories into one.\n\nIn this shopping mall system, it is not possible to delete a\n{@link IShoppingChannelCategory category}, because it is a systematic\nentity affecting to all other core entities like\n{@link IShoppingSale sales}. Instead of deleting, you can merge multiple\ncategories into one.\n\nIf you specify a category to absorb others, then all of other categories\nwill be merged into the specified one. Also, subsidiary entities of\ncategories also be merged and their references also be merged cascadingly." - } - }, - "/shoppings/admins/systematic/channels/{channelCode}/categories/{id}/invert": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target category's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed category info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - } - } - } - } - }, - "summary": "Get a category info of inverted", - "description": "Get a category info of inverted.\n\nGet a inverted {@link IShoppingChannelCategory.IInvert category} information.\n\nReturned category contains the recursive parent categories, but not contains\nthe hierarchical children categories." - } - }, - "/shoppings/admins/systematic/channels": { - "post": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of the channel", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created channel", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel" - } - } - } - } - }, - "summary": "Create a new channel", - "description": "Create a new channel.\n\nCreate a new {@link IShoppingChannel channel} with given code and name.\n\nAs channel means an individual market,\n{@link IShoppingAdministrator administrator} should perform this action\nonly when a new application being registered." - }, - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated channels", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingChannel" - } - } - } - } - }, - "summary": "List up every channels", - "description": "List up every channels.\n\nList up every {@link IShoppingChannel channels} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannel.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingChannel.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/systematic/channels/{id}": { - "put": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target channel's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the channel", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Update a channel", - "description": "Update a channel.\n\nUpdate a {@link IShoppingChannel channel}'s name.\n\nNote that, it is not possible to change the channel's code. If you want to\nto do it forcibly, then {@link create} new one and {@link merge} with it." - }, - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed channel info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "Get a channel info", - "description": "Get a channel info.\n\nGet a detailed {@link IShoppingChannel.IHierarchical channel} information.\n\nReturned channel instance also contains the nested\n{@link IShoppingChannelCategory.IHierarchical hierarchical category}\ninformations." - } - }, - "/shoppings/admins/systematic/channels/merge": { - "delete": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of the merge", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IRecordMerge" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Merge multiple channels into one", - "description": "Merge multiple channels into one.\n\nIn this shopping mall system, it is not possible to delete a\n{@link IShoppingChannel channel}, because it is a systematic entity\naffecting to all other core entities like customers, members and\nsales. Instead of deleting, you can merge multiple channels into one.\n\nIf you specify a channel to absorb others, then all of other channels\nwill be merged into the specified one. Also, subsidiary entities of\nchannels also be merged and their references also be merged cascadingly." - } - }, - "/shoppings/admins/systematic/channels/hierarchical": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated channels with nested categories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "List up every channels with nested categories", - "description": "List up every channels with nested categories.\n\nList up every {@link IShoppingChannel.IHierarchical channels} with\n{@link IPage pagination}. Returned channels contain nested hierarchical\n{@link IShoppingChannelCategory.IHierarchical categories}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannel.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingChannel.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/systematic/channels/{code}/get": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "code", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed channel info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "Get a channel info by its code", - "description": "Get a channel info by its code.\n\nGet a detailed {@link IShoppingChannel.IHierarchical channel} information\nby its code.\n\nReturned channel instance also contains the nested\n{@link IShoppingChannelCategory.IHierarchical hierarchical category}\ninformations." - } - }, - "/shoppings/admins/systematic/sections": { - "post": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of the section", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created section", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Create a new section", - "description": "Create a new section.\n\nCreate a new {@link IShoppingSection section} with given code and name.\n\nAs section means a spatial unit of a market that handling different type\nof products with other section, {@link IShoppingAdministrator administrator}\nshould perform this action only when a new section being required." - }, - "patch": { - "tags": [ - "Section" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated sections", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSection" - } - } - } - } - }, - "summary": "List up every sections", - "description": "List up every sections.\n\nList up every {@link IShoppingSection sections} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSection.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingSection.IRequest.sort sort condition}." - } - }, - "/shoppings/admins/systematic/sections/{id}": { - "put": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target section's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the section", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection.IUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Update a section", - "description": "Update a section.\n\nUpdate a {@link IShoppingSection section}'s name.\n\nNote that, it is not possible to change the section's code. If you want to\nto do it forcibly, then {@link create} new one and {@link merge} with it." - }, - "get": { - "tags": [ - "Section" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target section's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed section info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Get a section info", - "description": "Get a section info.\n\nGet a detailed {@link IShoppingSection section} information." - } - }, - "/shoppings/admins/systematic/sections/merge": { - "delete": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "input Request info of the merge", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IRecordMerge" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Merge multiple sections into one", - "description": "Merge multiple sections into one.\n\nIn this shopping mall system, it is not possible to delete a\n{@link IShoppingSection section}, because it is a systematic entity\naffecting to all other core entities like {@link IShoppingSale sales}.\nInstead of deleting, you can merge multiple sections into one.\n\nIf you specify a section to absorb others, then all of other sections\nwill be merged into the specified one. Also, subsidiary entities of\nsections also be merged and their references also be merged cascadingly." - } - }, - "/shoppings/admins/systematic/sections/{code}/get": { - "get": { - "tags": [ - "Section" - ], - "parameters": [ - { - "name": "code", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target section's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed section info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Get a section info by its code", - "description": "Get a section info by its code.\n\nGet a detailed {@link IShoppingSection section} information by its code." - } - }, - "/shoppings/customers/authenticate/refresh": { - "patch": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Refresh token.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer.IRefresh" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Customer information with new token", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer.IAuthorized" - } - } - } - } - }, - "summary": "Refresh the authentication token", - "description": "Refresh the authentication token.\n\nCreate a new {@link IShoppingCustomer.IToken.access access token} of a\n{@link IShoppingCustomer customer} with the pre-issued\n{@link IShoppingCustomer.IToken.refresh refresh} token.\n\nNote that, this function is available until the\n{@link IShoppingCustomer.IToken.refreshable_until} value." - } - }, - "/shoppings/customers/authenticate": { - "get": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "responses": { - "200": { - "description": "Current customer information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer" - } - } - } - } - }, - "summary": "Get current customer info", - "description": "Get current customer info.\n\nGet current {@link IShoppingCustomer customer} information from the\n{@link IShoppingCustomer.IToken.access access token}." - }, - "post": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Creation information of the customer.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Created customer information with token.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer.IAuthorized" - } - } - } - } - }, - "summary": "Create a new customer record", - "description": "Create a new customer record.\n\nThis shopping mall system defines everyone participating in this market as\na \"customer\". And the customer records are not archived based on individual\n{@link IShoppingCitizen people}, but based on the unit of connection.\nTherefore, even if it is the same person, a new {@link IShoppingCustomer}\nrecord is created every time a connection is made.\n\nTherefore, all Client Applications that access this service must first call\nthis function, report the customer's inflow path to the server, and create\nan {@link IShoppingCustomer.IToken.access access token}. If you skip this\nfunction call, all the other API functions would be prohibited. There is no\nexception, even if you want to {@link activate} your citizenship or\n{@link login} with your {@link IShoppingMember member account}. Before\nauthenticating yourself or logging in, be sure to call this function first.\nThis also applies when an {@link IShoppingAdministrator administrator} or\n{@link IShoppingSeller seller} logs in.\n\nAlso, the authentication token has an\n{@link IShoppingCustomer.IToken.expired_at expiration time}\nand cannot be used permanently. For reference, the authentication token is\nvalid for 3 hours, and if you want to maintain customer authentication even\nafter 3 hours, you must call the {@link refresh} function." - } - }, - "/shoppings/customers/authenticate/join": { - "post": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Join information of the member", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMember.IJoin" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Joined customer information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer" - } - } - } - } - }, - "summary": "Join membership", - "description": "Join membership.\n\n{@link IShoppingCustomer Customer} signs up for\n{@link IShoppingMember membership} of current shopping mall system.\n\nIf you've performed the {@link IShoppingCitizen citizenship}\n{@link activate activation} too, then you can skip the {@link activate}\nfunction calling everytime you log in from now on. Also, if the person had\n{@link IShoppingOrder purchased} with {@link activate} and {@link external}\nfunction calling, you can also access to the order history too. In other\nwords, activity details prior to membership registration can also be\naccessed with continuity.\n\nFor reference, as described in the {@link create} function, before calling\nthis `join` function, you must first create a customer record and token by\ncalling the {@link create} function." - } - }, - "/shoppings/customers/authenticate/login": { - "put": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Login request info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMember.ILogin" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Logged in Customer information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer" - } - } - } - } - }, - "summary": "Membership login", - "description": "Membership login.\n\n{@link IShoppingCustomer Customer} logs in with his/her\n{@link IShoppingMember membership} account with the email and password.\n\nIf the {@link IShoppingMember member} has previously performed\n{@link activate citizenship activation}, the {@link IShoppingCustomer.citizen}\nvalue would be filled in accordingly. And if the member has also signed up\nas an {@link IShoppingAdministrator administrator} or\n{@link IShoppingSeller seller}, the relevant information is also entered\naccordingly.\n\nFor reference, as described in the {@link create} function, before calling\nthis `login` function, you must first create a customer record and token by\ncalling the {@link create} function." - } - }, - "/shoppings/customers/authenticate/activate": { - "post": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Activation information of the citizenship", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCitizen.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Activated customer information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer" - } - } - } - } - }, - "summary": "Activate citizenship", - "description": "Activate citizenship.\n\n{@link IShoppingCustomer Customer} activates his/her\n{@link IShoppingCitizen citizenship} with mobile number and real name.\n\nIf the custommer already {@link join joined} to the\n{@link IShoppingMember membership}, then you can skip the citizenship\n{@link activation} function calling everytime you log in from now on.\nOf course, such story would be same to the {@link external} function, too.\n\nFor reference, as described in the {@link create} function, before calling\nthis `activate` function, you must first create a customer record and token\nby calling the {@link create} function." - } - }, - "/shoppings/customers/authenticate/external": { - "post": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Enroll information of the external user", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingExternalUser.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "External user enrolled customer information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCustomer" - } - } - } - } - }, - "summary": "Enroll external user info", - "description": "Enroll external user info.\n\n{@link IShoppingCustomer Customer} enrolls his/her\n{@link IShoppingExternalUser external user} information from other service.\n\nIt has similar effect with the {@link join membership joining} function,\nso that if you've performed the {@link IShoppingCitizen citizenship}\n{@link activate activation} too, then you can skip the {@link activate}\nfunction calling everytime you call this `external` function with same\ninfo from now on. Also, if the person had\n{@link IShoppingOrder purchased} with {@link activate} and {@link join}\nfunction calling, you can also access to the order history too. In other\nwords, activity details prior to external server registration can also be\naccessed with continuity.\n\nFor reference, as described in the {@link create} function, before calling\nthis `external` function, you must first create a customer record and token\nby calling the {@link create} function." - } - }, - "/shoppings/customers/authenticate/password/change": { - "put": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "New password and current password", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMember.IPasswordChange" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Change password", - "description": "Change password.\n\nChange password of {@link IShoppingMember member} with the current password.\n\nThe reason why the current password is required is for security." - } - }, - "/shoppings/customers/coupons": { - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCoupon.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated coupons", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingCoupon" - } - } - } - } - }, - "summary": "List up every coupons", - "description": "List up every coupons.\n\nList up every {@link IShoppingCoupon coupons} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingCoupon.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingCoupon.IRequest.sort sort condition}.\n\nFor reference, if you are a {@link IShoppingCustomer customer}, then\nonly {@link IShoppingCouponTicket ticketable} coupons would be listed up.\nOtherwise, non-ticketable coupons would also be listed up." - } - }, - "/shoppings/customers/coupons/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target coupon's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Coupon info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCoupon" - } - } - } - } - }, - "summary": "Get a coupon info", - "description": "Get a coupon info.\n\nGet a {@link IShoppingCoupon coupon} information.\n\nIf you are a {@link IShoppingCustomer customer}, then only\n{@link IShoppingCouponTicket ticketable} coupons are accessible. Non\nticketable coupons cause 410 gone error. Otherwise you are a\n{@link IShoppingSeller seller} or {@link IShoppingAdministrator administrator},\nnon-ticketable coupons are also accessible." - } - }, - "/shoppings/customers/coupons/tickets": { - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCouponTicket.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated coupon tickets", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingCouponTicket" - } - } - } - } - }, - "summary": "List up every coupon tickets", - "description": "List up every coupon tickets.\n\nList up every {@link IShoppingCouponTicket coupon tickets} of the\n{@link IShoppingCustomer customer} with {@link IPage pagination}.\n\nFor reference, coupon ticket means that a {@link IShoppingCoupon coupon}\nhas been taken by a customer. If the target coupon has expiration day or\ndate, the coupon ticket also has\n{@link IShoppingCouponTicket.expired_at expiration time}, and such expired\ntickets would not be listed up. Likewise, tickets used to\n{@link IShoppingCouponTicketPayment pay} for the {@link IShoppingOrder order}\nwould not be listed up, either.\n\nAdditionally, you can limit the result by configuring\n{@link IShoppingCouponTicket.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingCouponTicket.IRequest.sort sort condition}." - }, - "post": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of coupon ticket", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCouponTicket.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created coupon ticket", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCouponTicket" - } - } - } - } - }, - "summary": "Create a new coupon ticket", - "description": "Create a new coupon ticket.\n\nCreate a new {@link IShoppingCouponTicket coupon ticket} of a specific\n{@link IShoppingCoupon coupon} for the {@link IShoppingCustomer customer}.\n\nBy the way, if the target coupon has been\n{@link IShoppingCoupon.expired_at expired} or\n{@link IShoppingCoupon.IInventory.volume out of stock} or\n{@link IShoppingCoupon.IInventory.volume_per_citizen exhausted for him/her},\n410 gone exception would be thrown.\n\nAlso, even though succeeded to create a new coupon ticket from the target\ncoupon, if the coupon has expiration day or date, the newly created ticket\nalso has {@link IShoppingCouponTicket.expired_at expiration time}, and it\nwould be disabled after the expiration time." - } - }, - "/shoppings/customers/coupons/tickets/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target coupon ticket's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Coupon ticket info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCouponTicket" - } - } - } - } - }, - "summary": "Get a coupon ticket", - "description": "Get a coupon ticket.\n\nGet a {@link IShoppingCouponTicket coupon ticket} information with its ID.\n\nBy the way, if the target coupon ticket has been\n{@link IShoppingCouponTicket.expired_at expired} or used to\n{@link IShoppingCouponTicketPayment pay} for the {@link IShoppingOrder order},\n410 gone exception would be thrown." - } - }, - "/shoppings/customers/deposits/charges": { - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositCharge.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated deposit charges", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingDepositCharge" - } - } - } - } - }, - "summary": "List up every deposit charges", - "description": "List up every deposit charges.\n\nList up every {@link IShoppingDepositCharge deposit charges} of the\n{@link IShoppingCustomer customer} with {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingDepositCharge.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingDepositCharge.IRequest.sort sort condition}." - }, - "post": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of the deposit charge", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositCharge.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created deposit charge", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositCharge" - } - } - } - } - }, - "summary": "Create a new deposit charge application", - "description": "Create a new deposit charge application.\n\nCreate a new {@link IShoppingDepositCharge deposit charge application}.\n\nBy the way, this function does not mean completion the deposit charge, but\nmeans just {@link IShoppingCustomer customer} is appling the deposit charge.\nThe deposit charge be completed only when customer\n{@link IShoppingDepositChargePublish.publish pay} the deposit charge." - } - }, - "/shoppings/customers/deposits/charges/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target deposit charge's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Deposit charge info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositCharge" - } - } - } - } - }, - "summary": "Get a deposit charge info", - "description": "Get a deposit charge info.\n\nGet a {@link IShoppingDepositCharge deposit charge} information." - }, - "put": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target deposit charge's ", - "required": true - } - ], - "requestBody": { - "description": "Value to change", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositCharge.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Update a deposit charge application", - "description": "Update a deposit charge application.\n\nUpdate value of a {@link IShoppingDepositCharge deposit charge application}\nthat has been applied by the {@link IShoppingCustomer}.\n\nIf the charge has been {@link IShoppingDepositChargePublish published},\nthen it is not possible to update the deposit charge. Only 410 gone exception\nwould be thrown." - }, - "delete": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target deposit charge's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Erase a deposit charge application", - "description": "Erase a deposit charge application.\n\nErase a {@link IShoppingDepositCharge deposit charge application} that has been\napplied by the {@link IShoppingCustomer}.\n\nIf the charge has been {@link IShoppingDepositChargePublish published}, then\nit is not possible to erase the deposit charge. In that case, you've to cancel\nthe payment by calling the {@link publish.cancel} function." - } - }, - "/shoppings/customers/deposits/charges/{chargeId}/publish/able": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "chargeId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target charge's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Whether the charge is publishable or not", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - }, - "summary": "Check publishable", - "description": "Check publishable.\n\nTest whether the {@link IShoppingDepositCharge charge} is publishable or not.\n\nIf the charge has not been {@link IShoppingDepositChargePublish published} and\nnot deleted yet, then it is possible to publish the charge" - } - }, - "/shoppings/customers/deposits/charges/{chargeId}/publish": { - "post": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "chargeId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target charge's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the publish", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositChargePublish.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created publish", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositChargePublish" - } - } - } - } - }, - "summary": "Publish a charge", - "description": "Publish a charge.\n\n{@link IShoppingDepositChargePublish Publish} a\n{@link IShoppingDepositCharge charge} that has been applied by the\n{@link IShoppingCustomer} with payment information gotten from the\npayment vendor system.\n\nAlso, the payment time can be different with the publish time. For example,\nif the payment method is manual bank account transfer, then the payment\nwould be delayed until the customer actually transfer the money. In that\ncase, {@link IShoppingDepositChargePublish.paid_at} would be `null` value,\nso that you have to check it after calling this publish function." - } - }, - "/shoppings/customers/deposits/histories": { - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositHistory.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated deposit histories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingDepositHistory" - } - } - } - } - }, - "summary": "List up every deposit histories", - "description": "List up every deposit histories.\n\nList up every {@link IShoppingDepositHistory deposit histories} of the\n{@link IShoppingCustomer customer} with {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingDepositHistory.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingDepositHistory.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/deposits/histories/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "", - "required": true - } - ], - "responses": { - "200": { - "description": "Deposit history info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDepositHistory" - } - } - } - } - }, - "summary": "Get a deposit history info", - "description": "Get a deposit history info.\n\nGet a {@link IShoppingDepositHistory deposit history} information." - } - }, - "/shoppings/customers/deposits/histories/balance": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [], - "responses": { - "200": { - "description": "Balance of the deposit", - "content": { - "application/json": { - "schema": { - "type": "number" - } - } - } - } - }, - "summary": "Get balance of the deposit", - "description": "Get balance of the deposit.\n\nGet current balance of the deposit of the {@link IShoppingCustomer customer}." - } - }, - "/shoppings/customers/mileages/histories": { - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMileageHistory.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated mileage histories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingMileageHistory" - } - } - } - } - }, - "summary": "List up every mileage histories", - "description": "List up every mileage histories.\n\nList up every {@link IShoppingMileageHistory mileage histories} of the\n{@link IShoppingCustomer customer} with {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingMileageHistory.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingMileageHistory.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/mileages/histories/{id}": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target mileage history's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Mileage history info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMileageHistory" - } - } - } - } - }, - "summary": "Get a mileage history info", - "description": "Get a mileage history info.\n\nGet a {@link IShoppingMileageHistory mileage history} information." - } - }, - "/shoppings/customers/mileages/histories/balance": { - "get": { - "tags": [ - "Discount" - ], - "parameters": [], - "responses": { - "200": { - "description": "Balance of the mileage", - "content": { - "application/json": { - "schema": { - "type": "number" - } - } - } - } - }, - "summary": "Get balance of the mileage", - "description": "Get balance of the mileage.\n\nGet current balance of the mileage of the {@link IShoppingCustomer customer}." - } - }, - "/shoppings/customers/carts/{cartId}/commodities": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartCommodity.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated commodities", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingCartCommodity" - } - } - } - } - }, - "summary": "List of every commodities", - "description": "List of every commodities.\n\nList up every {@link IShoppingCartCommodity commodities} in the\nshopping cart with {@link IPage pagination}.\n\nIf the *cartId* is not specified but `null` value assigned, then every\ncart would be targetted. Also, you can limit the result by configuring\n{@link IShoppingCartCommodity.IRequest.search search condition} in the\nrequest body. Furthermore, it is possible to customize sequence order of\nrecords by configuring {@link IShoppingCartCommodity.IRequest.sort}.\n\nFor reference, when some commodity be {@link IShoppingOrder ordered} and\n{@link IShoppingOrderPublish published}, then it would not be appread in\nthe shopping cart more. Otherwise, the order has not been published yet,\nit would be appread in the shopping cart and still enable to create a new\n{@link IShoppingOrder order application} with the same commodity.\n\nOf course, if the target {@link IShoppingSale sale} has been suspended, or\n{@link IShoppingSaleUnitStockInventory out of stock}, then it would not be\nappread in the shopping cart more, either." - }, - "post": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the commodity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartCommodity.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created commodity", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartCommodity" - } - } - } - } - }, - "summary": "Create a new commodity", - "description": "Create a new commodity.\n\nCreate a new {@link IShoppingCartCommodity commodity} into a specific\nshopping cart.\n\nIf {@link IShoppingCartCommodity.ICreate.accumulate} has `true` value\nand there's some same commodity that composed with same\n{@link IShoppingSaleUnitStock.IInvert stocks and quantities},\nthen new commodity would not be created but the volume would be accumulated.\n\nAlso, if the *cartId* is not specified but `null` value assigned, then\nordinary cart would be utilized or create new one considering the\nexistence of the previous cart.\n\nBy the way, if the target {@link IShoppingSale sale} has been suspended or\n{@link IShoppingSaleUnitStockInventory out of stock}, then 410 gone error\nwould be thrown. Therefore, it would better to check the target sale and\n{@link IShoppingSaleUnitStock stock}'s status before." - } - }, - "/shoppings/customers/carts/{cartId}/commodities/{id}": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target commodity's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed commodity info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartCommodity" - } - } - } - } - }, - "summary": "Get a commodity", - "description": "Get a commodity.\n\nGet a {@link IShoppingCartCommodity commodity} record of the shopping cart.\n\nIf the *cartId* is different with the belonged cart's ID, then 404 not\nfound exception would be thrown. Otherwise, the *cartId* has `null` value,\nsuch dependency checking would be skipped, but still ownership would be\nvalidated.\n\nAlso, if target {@link IShoppingSale sale} has been suspended or\n{@link IShoppingSaleUnitStockInventory out of stock}, then 410 gone error\nwould be thrown. Therefore, even if you've created a commodity successfully\nwith the {@link create} method, it still can be failed when you access the\ncommodity with this {@link at} method." - }, - "put": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target commodity's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the commodity (volume)", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartCommodity.IUpdate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Update a commodity (volume)", - "description": "Update a commodity (volume).\n\nUpdate a {@link IShoppingCartCommodity commodity}'s volume in the\nshopping cart.\n\nIf the *cartId* is different with the belonged cart's ID, then 404 not\nfound exception would be thrown. Otherwise, the *cartId* has `null` value,\nsuch dependency checking would be skipped, but still ownership would be\nvalidated.\n\nAlso, if target {@link IShoppingSale sale} has been suspended or\n{@link IShoppingSaleUnitStockInventory out of stock} suddenly, then 410\ngone error would be thrown, either." - }, - "delete": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target commodity's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Newly created commodity" - } - }, - "summary": "Erase a commodity", - "description": "Erase a commodity.\n\nErase a {@link IShoppingCartCommodity commodity} from the shopping cart.\n\nIf the commodity is on an {@link IShoppingOrder order} process, it is not\npossible to erase it. Instead, if the order has been\n{@link IShoppingOrderPublish published}, then it would not be appread in\nthe shopping cart more. If the order be erased, then you also can continue\nerasinng the commodity, neither." - } - }, - "/shoppings/customers/carts/{cartId}/commodities/{id}/replica": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target commodity's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Creation info of the commodity for replication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartCommodity.ICreate" - } - } - } - } - }, - "summary": "Get replica of a commodity", - "description": "Get replica of a commodity.\n\nGet a {@link IShoppingCartCommodity.ICreate} typed info of the target\ncommodity for replication.\n\nBy the way, if the *cartId* is different with the belonged cart's ID,\nthen 404 not found exception would be thrown. Otherwise, the *cartId*\nhas `null` value, such dependency checking would be skipped, but still\nownership would be validated.\n\nAlso, if target {@link IShoppingSale sale} has been suspended or\n{@link IShoppingSaleUnitStockInventory out of stock} suddenly,\nthen 410 gone error would be thrown, either." - } - }, - "/shoppings/customers/carts/{cartId}/commodities/discountable": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "cartId", - "in": "path", - "schema": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ] - }, - "description": "Belonged cart's ID", - "required": true - } - ], - "requestBody": { - "description": "Request info for discountable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartDiscountable.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Discountable info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCartDiscountable" - } - } - } - } - }, - "summary": "Get discountable info", - "description": "Get discountable info.\n\nCompute discountable features about the\n {@link IShoppingCartCommodity shopping cart} even including\nnon-carted {@link IShoppingSale sales}.\n\nReturned {@link IShoppingCartDiscountable} contains including\ncombinations of adjustable {@link IShoppingCoupon coupons},\nwithdrawable {@link IShoppingDepositHistory deposits} and\n{@link IShoppingMileageHistory mileages}.\n\nAlso, if you want to know the discountable info about some specific\nsales that have not been carted yet, specify the sales\nto the {@link IShoppingCartDiscountable.pseudos} property with composing\n{@link IShoppingCartCommodity.ICreate creation info of the commodities}.\nThen, they would be included in the discountable info." - } - }, - "/shoppings/customers/orders": { - "post": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of the order", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created order", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder" - } - } - } - } - }, - "summary": "Create a new order application", - "description": "Create a new order application.\n\nCreate a new {@link IShoppingOrder order application} from a\n{@link IShoppingCartCommodity shopping cart} that has been composed by the\n{@link IShoppingCustomer}. Of course, do not need to put every commodities\nto the order, but possible to select some of them by the customer.\n\nBy the way, this function does not mean completion the order, but means\njust customer is appling the order. The order be completed only when customer\n{@link IShoppingOrderPublish.paid_at pays} the order." - }, - "patch": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated orders", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingOrder" - } - } - } - } - }, - "summary": "List up every orders", - "description": "List up every orders.\n\nList up every {@link IShoppingOrder orders} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingOrder.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingOrder.IRequest.sort sort condition}.\n\nFor reference, if you are a {@link IShoppingCustomer customer}, then\nyou can list up your own orders, and it is not a matter whether the\norder has been {@link IShoppingOrderPublish.paid_at paid} or not.\n\nOtherwise you are a {@link IShoppingSeller seller} or\n{@link IShoppingAdministrator administrator}, then you can list up\nonly paid orders. Also, in the seller case, only related\n{@link IShoppingOrder.goods goods} would be listed up in the order." - } - }, - "/shoppings/customers/orders/{id}": { - "delete": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Erase an order application", - "description": "Erase an order application.\n\nErase an order application that has been applied by the\n{@link IShoppingCustomer}.\n\nIf the order has been {@link IShoppingOrderPublish published}, then it is\nnot possible to erase the order. In that case, you've to cancel the\npayment by calling the {@link publish.cancel} function." - }, - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Order info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder" - } - } - } - } - }, - "summary": "Get an order info", - "description": "Get an order info.\n\nGet a detailed {@link IShoppingOrder order} information.\n\nIf you are not a {@link IShoppingCustomer customer}, then you can't\naccess to the order which has not been\n{@link IShoppingOrderPublish.paid_at paid} yet. In that case,\n404 not found error would be thrown." - } - }, - "/shoppings/customers/orders/{id}/price": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed price info with discount", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrderPrice" - } - } - } - } - }, - "summary": "Get price of the order", - "description": "Get price of the order.\n\nGet detailed price information of the {@link IShoppingOrder order}.\n\nReturned price info contains not only the amount of the order, but also\ncontains the discount amount by {@link IShoppingCoupono coupons},\n{@link IShoppingDepositHistory deposits} and\n{@link IShoppingMileageHistory mileages}." - } - }, - "/shoppings/customers/orders/{id}/discountable": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "requestBody": { - "description": "Request info for discountable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrderDiscountable.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Discountable info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrderDiscountable" - } - } - } - } - }, - "summary": "Get discountable info", - "description": "Get discountable info.\n\nCompute discountable features about the {@link IShoppingOrder}.\n\nRetured {@link IShoppingOrderDiscountable} contains including\ncombinations of adjustable {@link IShoppingCoupon coupons},\nwithdrawable {@link IShoppingDepositHistory deposits}\nand {@link IShoppingMileageHistory mileages}.\n\nOf course, returned features are valid only when the order has not\nbeen {@link IShoppingOrderPublish published} yet. If the order has\nalready been published, then no way to discount the price more." - } - }, - "/shoppings/customers/orders/{id}/discount": { - "put": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "requestBody": { - "description": "Discount info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrderPrice.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Detailed price info with discount", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrderPrice" - } - } - } - } - }, - "summary": "Discount the order", - "description": "Discount the order.\n\nDiscount total price of the {@link IShoppingOrder} by adjusting\n{@link IShoppingCoupon coupons}, {@link IShoppingDepositHistory deposits}\nand {@link IShoppingMileageHistory mileages}. If amount of discount\nfeatures are equal to the total price of the order, it is possible to\n{@link IShoppingOrderPublish publish} it without any cash.\n\nBy the way, the discounting features must be valid. If not, 428\nunprocessable entity error would be thrown. To know which features are\nadjustable or withdrawable, call the {@link discountable} function\nbefore." - } - }, - "/shoppings/customers/orders/{orderId}/goods/{id}/confirm": { - "put": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "orderId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged order's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target good's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Confirm an order good", - "description": "Confirm an order good.\n\nConfirm an {@link IShoppingOrderGood order good} that has been\ncompleted {@link IShoppingDelivery delivering} to the\n{@link IShoppingCustomer customer}.\n\nIn other words, belonged {@link IShoppingOrder order} must be\n{@link IShoppingPublish.paid_at published, paid} and delivery of\nthe good must be {@link IShoppingDeliveryJourney arrived} to the\ncustomer. If not, 428 unprocessable entity error would be thrown." - } - }, - "/shoppings/customers/orders/{orderId}/publish/able": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "orderId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Whether the order is publishable or not", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } - } - }, - "summary": "Check publishable", - "description": "Check publishable.\n\nTest whether the {@link IShoppingOrder order} is publishable or not.\n\nIf the order has not been {@link IShoppingOrderPublish published} and\nnot deleted yet, then it is possible to publish the order. Even thouogh\ntarget {@link IShoppingSale sale} is suspended or\n{@link IShoppingSaleUnitStockInventory out of stock}, it is still possible\nto publish because the order already has been applied." - } - }, - "/shoppings/customers/orders/{orderId}/publish": { - "post": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "orderId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the publish", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingOrderPublish.ICashCreate" - }, - { - "$ref": "#/components/schemas/IShoppingOrderPublish.IZeroCreate" - } - ] - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created publish", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrderPublish" - } - } - } - } - }, - "summary": "Publish an order", - "description": "Publish an order.\n\n{@link IShoppingOrderPublish Publish} an {@link IShoppingOrder order} that\nhas been applied by the {@link IShoppingCustomer} with\n{@link IShoppingAddress address} to delivery and payment information gotten\nfrom the payment vendor system.\n\nIf the order has been discounted for entire order price, then no need\nto send payment vendor info. Instead, only address info is required.\n\nAlso, the payment time can be different with the publish time. For example,\nif the payment method is manual bank account transfer, then the payment\nwould be delayed until the customer actually transfer the money. In that\ncase, {@link IShoppingOrderPublish.paid_at} would be `null` value, so\nthat you have to check it after calling this publish function." - }, - "delete": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "orderId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Cancel the publish (payment)", - "description": "Cancel the publish (payment).\n\nCancel payment of an {@link IShoppingOrder order} that has been\n{@link IShoppingOrderPublish published}.\n\nIf target publish's payment method is manual bank account transfer,\nthen it would be cancelled directly. If not, then payment cancel\nrequest would be sent to the payment vendor system." - } - }, - "/shoppings/customers/sales": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated sales with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSale.ISummary" - } - } - } - } - }, - "summary": "List up every summarized sales", - "description": "List up every summarized sales.\n\nList up every {@link IShoppingSale.ISummary summarized sales}.\n\nAs you can see, returned sales are summarized, not detailed. If you want\nto get the detailed information of a sale, use {@link at} function for\neach sale.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}s. Otherwise you're a\n{@link IShoppingCustomer customer}, you can see only the operating\nsales in the market. You can't see the unopened, closed, or suspended\nsales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSale.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingSale.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/sales/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed sale information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Get a sale info", - "description": "Get a sale info.\n\nGet a {@link IShoppingSale sale} with detailed information.\n\nIf you're a {@link IShoppingSeller seller}, you can only access to the\nyour own {@link IShoppingSale sale}. Otherwise you're a\n{@link IShoppingCustomer customer}, you can access to only the operating\nsales in the market. You can't access to the unopened, closed, or suspended\nsales." - } - }, - "/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated inquiry comments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "List up every inquiry comments", - "description": "List up every inquiry comments.\n\nList up every {@link IShoppingSaleInquiryComment inquiry comments} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleInquiryComment.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleInquiryComment.IRequest.sort sort condition}.\n\nBy the way, if you're a {@link IShoppingSeller seller}, you can only access\nto the your own {@link IShoppingSale sale}'s inquiries. Otherwise, you\ncan access to every inquiries of the sales." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Create an inquiry comment", - "description": "Create an inquiry comment.\n\nCreate an {@link IShoppingSaleInquiryComment inquiry comment} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\ncreate an inquiry comment to your own {@link IShoppingSale sale}'s inquiry.\nOtherwise, you can create an inquiry comment to every inquiries of the sales." - } - }, - "/shoppings/customers/sales/{saleId}/questions/{inquiryId}/comments/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed inquiry comment info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Get an inquiry comment info", - "description": "Get an inquiry comment info.\n\nGet a detailed {@link IShoppingSaleInquiryComment inquiry comment}\ninformation of a {@link IShoppingSaleQuestion question} or\n{@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s inquiry comment.\nOtherwise, you can access to every inquiry comments of the sales." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ISnapshot" - } - } - } - } - }, - "summary": "Update an inquiry comment", - "description": "Update an inquiry comment.\n\nUpdate an {@link IShoppingSaleInquiryComment inquiry comment} to a specific\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nBy the way, as is the general policy of this shopping mall regarding\ncomments, modifying a comment does not actually change the existing content.\nModified content is accumulated and recorded in the existing comment record\nas a new {@link IShoppingSaleInquiryComment.ISnapshot snapshot}. And this\nis made public to everyone, who can read this inquiry comment.\n\nThis is to prevent customers or sellers from modifying their comments and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/customers/sales/{saleId}/questions": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the question", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created question", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion" - } - } - } - } - }, - "summary": "Write a question article", - "description": "Write a question article.\n\nWhen a {@link IShoppingCustomer customer} wants to ask something about\na specific {@link IShoppingSale sale}, he/she can ask it by writing a\nnew {@link IShoppingSaleQuestion question article}.\n\nIf the customer does not want to reveal his/her identify and question,\nhe/she can write the question as a secret article. In that case, only\nthe customer and the related {@link IShoppingSeller seller} can see\nthe {@link at detailed content}. Also, such secret question's title and\nwriter name would be masked with `*` characters in the\n{@link index pagiation API}." - }, - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated questions with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleQuestion.ISummary" - } - } - } - } - }, - "summary": "List up every summarized questions", - "description": "List up every summarized questions.\n\nList up every {@link IShoppingSaleQuestion.ISummary summarized questions} of a\n{@link IShoppingSale sale}.\n\nAs you can see, returned questions are summarized, not detailed. If you want\nto get the detailed information of a question, use {@link adridges} function\nor {@link at} function for each article.\n\nAlso, returned question has {@link IShoppingSaleQuestion.ISummary.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\nAdditionally, returned question has another special property\n{@link IShoppingSaleQuestion.ISummary.secret} with masking to other\nprincple properties, and it means only related actors can {@link at read}\nthe question.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s questions. Otherwise,\nyou can access to every questions of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleQuestion.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleQuestion.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/sales/{saleId}/questions/{id}": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target question's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the question", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBbsArticle.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created snapshot record of the question", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBbsArticle.ISnapshot" - } - } - } - } - }, - "summary": "Update a question", - "description": "Update a question.\n\nUpdate a {@link IShoppingSaleQuestion question}'s content.\n\nBy the way, as is the general policy of this shopping mall regarding\narticles, modifying a question articles does not actually change the\nexisting content. Modified content is accumulated and recorded in the\nexisting article record as a new\n{@link IShoppingSaleQuestion.ISnapshot snapshot}. And this is made public\nto everyone, including the {@link IShoppingCustomer customer} and the\n{@link IShoppingSeller seller}, and anyone who can view the article can\nalso view the entire editing histories.\n\nThis is to prevent customers or sellers from modifying their articles and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - }, - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target question's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed question info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion" - } - } - } - } - }, - "summary": "Get a question info", - "description": "Get a question info.\n\nGet a detailed {@link IShoppingSaleQuestion question} information of a\n{@link IShoppingSale sale}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s question. Otherwise\nyou are a {@link IShoppingCustomer customer}, you can access to every\nquestions of the sales except the {@link IShoppingSaleQuestion.secret}\nvalue is `false`." - } - }, - "/shoppings/customers/sales/{saleId}/questions/abridges": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated questions with abridged information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleQuestion.IAbridge" - } - } - } - } - }, - "summary": "List up every abridged questions", - "description": "List up every abridged questions.\n\nList up every {@link IShoppingSaleQuestion.IAbridge abridged questions} of\na {@link IShoppingSale sale}.\n\nAs you can see, returned questions are abridged, not detailed. If you want\nto get the detailed information of a question, use {@link at} function\nfor each article.\n\nAlso, returned question has {@link IShoppingSaleQuestion.IAridge.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\nAdditionally, returned question has another special property\n{@link IShoppingSaleQuestion.IAridge.secret} with masking to other\nprincple properties, and it means only related actors can {@link at read}\nthe question.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s questions. Otherwise,\nyou can access to every questions of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleQuestion.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleQuestion.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated inquiry comments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "List up every inquiry comments", - "description": "List up every inquiry comments.\n\nList up every {@link IShoppingSaleInquiryComment inquiry comments} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleInquiryComment.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleInquiryComment.IRequest.sort sort condition}.\n\nBy the way, if you're a {@link IShoppingSeller seller}, you can only access\nto the your own {@link IShoppingSale sale}'s inquiries. Otherwise, you\ncan access to every inquiries of the sales." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Create an inquiry comment", - "description": "Create an inquiry comment.\n\nCreate an {@link IShoppingSaleInquiryComment inquiry comment} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\ncreate an inquiry comment to your own {@link IShoppingSale sale}'s inquiry.\nOtherwise, you can create an inquiry comment to every inquiries of the sales." - } - }, - "/shoppings/customers/sales/{saleId}/reviews/{inquiryId}/comments/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed inquiry comment info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Get an inquiry comment info", - "description": "Get an inquiry comment info.\n\nGet a detailed {@link IShoppingSaleInquiryComment inquiry comment}\ninformation of a {@link IShoppingSaleQuestion question} or\n{@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s inquiry comment.\nOtherwise, you can access to every inquiry comments of the sales." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ISnapshot" - } - } - } - } - }, - "summary": "Update an inquiry comment", - "description": "Update an inquiry comment.\n\nUpdate an {@link IShoppingSaleInquiryComment inquiry comment} to a specific\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nBy the way, as is the general policy of this shopping mall regarding\ncomments, modifying a comment does not actually change the existing content.\nModified content is accumulated and recorded in the existing comment record\nas a new {@link IShoppingSaleInquiryComment.ISnapshot snapshot}. And this\nis made public to everyone, who can read this inquiry comment.\n\nThis is to prevent customers or sellers from modifying their comments and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/customers/sales/{saleId}/reviews": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the review", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created review", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview" - } - } - } - } - }, - "summary": "Write a review article", - "description": "Write a review article.\n\nWhen a {@link IShoppingCustomer customer} has purchased a specific\n{@link IShoppingSale sale} and get {@link IShoppingDelivery delivered} it,\nhe/she can write a {@link IShoppingSaleReview review} article about the sale.\n\nIf try to write a review article without purchasing or the delivery has not\nbeen completed, 428 unprocessable entity error would be thrown. Also, the\ncustomer can write multiple review articles per an order, but the next\narticle can be written after 2 weeks from the previous article. If not,\n428 unprocessable entity error would be thrown, either." - }, - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated reviews with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleReview.ISummary" - } - } - } - } - }, - "summary": "List up every summarized reviews", - "description": "List up every summarized reviews.\n\nList up every {@link IShoppingSaleReview.ISummary summarized reviews} of a\n{@link IShoppingSale sale}.\n\nAs you can see, returned reviews are summarized, not detailed. If you want\nto get the detailed information of a review, use {@link adridges} function\nor {@link at} function for each article.\n\nAlso, returned review has {@link IShoppingSaleReview.ISummary.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s reviews. Otherwise,\nyou can access to every reviews of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleReview.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleReview.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/sales/{saleId}/reviews/{id}": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target review's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the review", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IUpdate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created snapshot record of the review", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.ISnapshot" - } - } - } - } - }, - "summary": "Update a review", - "description": "Update a review.\n\nUpdadte a {@link IShoppingSaleReview review}'s content and score.\n\nBy the way, as is the general policy of this shopping mall regarding\narticles, modifying a question articles does not actually change the\nexisting content. Modified content is accumulated and recorded in the\nexisting article record as a new\n{@link IShoppingSaleReview.ISnapshot snapshot}. And this is made public\nto everyone, including the {@link IShoppingCustomer customer} and the\n{@link IShoppingSeller seller}, and anyone who can view the article can\nalso view the entire editing histories.\n\nThis is to prevent customers or sellers from modifying their articles and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - }, - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target review's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed review info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview" - } - } - } - } - }, - "summary": "Get a review info", - "description": "Get a review info.\n\nGet a detailed {@link IShoppingSaleReview review} information of a\n{@link IShoppingSale sale}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s review. Otherwise\nyou are a {@link IShoppingCustomer customer}, you can access to every\nreviews of the sales." - } - }, - "/shoppings/customers/sales/{saleId}/reviews/abridges": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated reviews with abridged information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleReview.IAbridge" - } - } - } - } - }, - "summary": "List up every abridged reviews", - "description": "List up every abridged reviews.\n\nList up every {@link IShoppingSaleReview.IAbridge abridged reviews} of\na {@link IShoppingSale sale}.\n\nAs you can see, returned reviews are abridged, not detailed. If you want\nto get the detailed information of a review, use {@link at} function\nfor each article.\n\nAlso, returned review has {@link IShoppingSaleReview.IAridge.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s reviews. Otherwise,\nyou can access to every reviews of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleReview.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleReview.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/sales/{saleId}/snapshots": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "requestBody": { - "description": "Requestion info of pagination", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPage.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated snapshots with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleSnapshot.ISummary" - } - } - } - } - }, - "summary": "List up every snapshots", - "description": "List up every snapshots.\n\nWhenever {@link IShoppingSeller seller} updates a\n{@link IShoppingSale sale}, the sale record is not updated but a new\n{@link IShoppingSaleSnapshot snapshot} record is created to keep the\nintegrity of the sale history. This API function is for listing up\nsuch snapshot records.\n\nAlso, as you can see from the return type, returned snapshots are\nsummarized, not detailed. If you want to get the detailed information\nof a snapshot, use {@link at} or {@link flipo} function for each snapshot.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s snapshots. Otherwise,\nyou can access to every snapshots of the sales even though the sale has\nbeen closed or suspended." - } - }, - "/shoppings/customers/sales/{saleId}/snapshots/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed information of the snapshot", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleSnapshot" - } - } - } - } - }, - "summary": "Get a snapshot info", - "description": "Get a snapshot info.\n\nGet a {@link IShoppingSaleSnapshot snapshot} with detailed information.\n\nAs you can see from the return type, returned snapshot does not contain\nthe {@link IShoppingSale sale} info. If you want to get the sale info,\nuse the {@link flip} function instead.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s snapshots. Otherwise,\nyou can access to every snapshots of the sales even though the sale has\nbeen closed or suspended." - } - }, - "/shoppings/customers/sales/{saleId}/snapshots/{id}/flip": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed sale information in the snapshot side", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Get a flipped snapshot info", - "description": "Get a flipped snapshot info.\n\nGet a {@link IShoppingSale sale} info of a flipped snapshot.\n\nAs you can see from the return type, this function returns the\n{@link IShoppingSale sale} info. By the way, the sale info is not the\nlatest one, but a flipped info in the snapshot side.\n\nAlso, if you're a {@link IShoppingSeller seller}, you can only access to\nthe your own {@link IShoppingSale sale}'s snapshots. Otherwise, you can\naccess to every snapshots of the sales even though the sale has been\nclosed or suspended." - } - }, - "/shoppings/customers/systematic/channels/{channelCode}/categories": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Paginated categories with children categories", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IHierarchical" - } - } - } - } - } - }, - "summary": "List up every categories with children records", - "description": "List up every categories with children records.\n\nList up every {@link IShoppingChannelCategory.IHierarchical categories}\nof a {@link IShoppingChannel channel} with pagination. Returned categories\ncontain children categories, too.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannelCategory.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingChannelCategory.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/systematic/channels/{channelCode}/categories/{id}": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target category's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed category info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory" - } - } - } - } - }, - "summary": "Get a category info", - "description": "Get a category info.\n\nGet a detailed {@link IShoppingChannelCategory category} information.\n\nReturned category contains hierarchical children categories, and also\ncontains the recursive parent categories, too." - } - }, - "/shoppings/customers/systematic/channels/{channelCode}/categories/{id}/invert": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target category's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed category info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - } - } - } - } - }, - "summary": "Get a category info of inverted", - "description": "Get a category info of inverted.\n\nGet a inverted {@link IShoppingChannelCategory.IInvert category} information.\n\nReturned category contains the recursive parent categories, but not contains\nthe hierarchical children categories." - } - }, - "/shoppings/customers/systematic/channels": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated channels", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingChannel" - } - } - } - } - }, - "summary": "List up every channels", - "description": "List up every channels.\n\nList up every {@link IShoppingChannel channels} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannel.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingChannel.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/systematic/channels/hierarchical": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated channels with nested categories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "List up every channels with nested categories", - "description": "List up every channels with nested categories.\n\nList up every {@link IShoppingChannel.IHierarchical channels} with\n{@link IPage pagination}. Returned channels contain nested hierarchical\n{@link IShoppingChannelCategory.IHierarchical categories}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannel.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingChannel.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/systematic/channels/{id}": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed channel info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "Get a channel info", - "description": "Get a channel info.\n\nGet a detailed {@link IShoppingChannel.IHierarchical channel} information.\n\nReturned channel instance also contains the nested\n{@link IShoppingChannelCategory.IHierarchical hierarchical category}\ninformations." - } - }, - "/shoppings/customers/systematic/channels/{code}/get": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "code", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed channel info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "Get a channel info by its code", - "description": "Get a channel info by its code.\n\nGet a detailed {@link IShoppingChannel.IHierarchical channel} information\nby its code.\n\nReturned channel instance also contains the nested\n{@link IShoppingChannelCategory.IHierarchical hierarchical category}\ninformations." - } - }, - "/shoppings/customers/systematic/sections": { - "patch": { - "tags": [ - "Section" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated sections", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSection" - } - } - } - } - }, - "summary": "List up every sections", - "description": "List up every sections.\n\nList up every {@link IShoppingSection sections} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSection.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingSection.IRequest.sort sort condition}." - } - }, - "/shoppings/customers/systematic/sections/{id}": { - "get": { - "tags": [ - "Section" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target section's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed section info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Get a section info", - "description": "Get a section info.\n\nGet a detailed {@link IShoppingSection section} information." - } - }, - "/shoppings/customers/systematic/sections/{code}/get": { - "get": { - "tags": [ - "Section" - ], - "parameters": [ - { - "name": "code", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target section's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed section info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Get a section info by its code", - "description": "Get a section info by its code.\n\nGet a detailed {@link IShoppingSection section} information by its code." - } - }, - "/shoppings/sellers/authenticate": { - "get": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "responses": { - "200": { - "description": "Seller info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSeller.IInvert" - } - } - } - } - }, - "summary": "Get seller information", - "description": "Get seller information.\n\nGet {@link IShoppingSeller.IInvert seller} information of\ncurrent {@link IShoppingCustomer customer}.\n\nIf current {@link IShoppingMember member} is not an seller,\nit throws 403 forbidden exception." - }, - "post": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Joining request info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSeller.IJoin" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Seller info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSeller.IInvert" - } - } - } - } - }, - "summary": "Join as an seller", - "description": "Join as an seller.\n\nJoin as an seller with {@link IShoppingSeller.IJoin joining info}.\n\nThis method is allowed only when the {@link IShoppingCustomer customer} already\nhas joined the {@link IShoppingMember membership}. IF not, he (she) must\naccomplish it before. If not, 403 forbidden exception would be thrown." - } - }, - "/shoppings/sellers/authenticate/login": { - "put": { - "tags": [ - "Authenticate" - ], - "parameters": [], - "requestBody": { - "description": "Login request info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingMember.ILogin" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Seller info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSeller.IInvert" - } - } - } - } - }, - "summary": "Login as an seller", - "description": "Login as an seller.\n\nLogin as an seller with {@link IShoppingSeller.ILogin login info}.\n\nThis method has exactly same effect with\n{@link ShoppingApi.functional.customers.authenticate.login} function, but\nreturned type is a llttle different. The similar function returns\n{@link IShoppingCustomer} type that starting from the customer information, so\nthat you have to access to the seller info through\n`customer.member.seller`. In contrast with that, this method returns\n{@link IShoppingSeller.IInvert} type that starting from the seller\ninfo, so that can access to the customer info through `seller.customer`.\n\nOf course, to use this function, you had to {@link join} as an seller\nbefore. If not, 403 forbidden exception would be thrown," - } - }, - "/shoppings/sellers/deliveries": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDelivery.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated deliveries", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingDelivery.IInvert" - } - } - } - } - }, - "summary": "Get list of deliveries", - "description": "Get list of deliveries.\n\nGet list of {@link IShoppingDelivery.IInvert deliveries} of current\n{@link IShoppingSeller seller} with {@link IPage pagination}.\n\nFor reference, returned deliveries are containing the target\n{@link IShoppingOrder.IInvertFromDelivery order} informations. Of course,\nonly related {@link IShoppingOrderGood goods} are contained in the orders.\n\nAdditionally, you can limit the result by configuring\n{@link IShoppingDelivery.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingDelivery.IRequest.sort sort condition}." - }, - "post": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of delivery", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDelivery.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created delivery", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDelivery" - } - } - } - } - }, - "summary": "Create a delivery", - "description": "Create a delivery.\n\nCreate a {@link IShoppingDelivery delivery} record targetting\n{@link IShoppingOrder orders}, their {@link IShoppingOrderGood goods} and\n{@link IShoppingSaleUnitStock stocks} ({@link IShoppingDeliveryPiece}) with\n{@link IShoppingDeliveryJourney journeys} and\n{@link IShoppingDeliveryShipper shippers} info.\n\nNote that, composition of the {@link IShoppingDeliveryPiece} must not over\nthe required. To identify which pieces are required, recommend to call\nthe {@link incompletes} function with target orders'\n{@link IShoppingOrderPublish.id}s before calling this one." - } - }, - "/shoppings/sellers/deliveries/{id}": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target delivery's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Delivery info with target orders", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDelivery.IInvert" - } - } - } - } - }, - "summary": "Get a delivery", - "description": "Get a delivery.\n\nGet a {@link IShoppingDelivery.IInvert delivery} information with its ID.\n\nFor reference, returned delivery is containing the target\n{@link IShoppingOrder.IInvertFromDelivery order} informations. Of course,\nonly related {@link IShoppingOrderGood goods} are contained in the orders." - } - }, - "/shoppings/sellers/deliveries/incompletes": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "List of target orders' ", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeliveryPiece.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "List of incomplete pieces", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryPiece.ICreate" - } - } - } - } - } - }, - "summary": "Get list of incomplete pieces", - "description": "Get list of incomplete pieces.\n\nGet list of {@link IShoppingDeliveryPiece incomplete pieces} of target\norders' {@link IShoppingOrderPublish.id}s.\n\nIf you specify target orders' publish IDs, then this function returns\nincompleted pieces of the orders with computation as an Array of\n{@link IShoppingDeliveryPiece.ICreate} type.\n\nYou can utillize the result to make a huge {@link IShoppingDelivery delivery}\nfor integrated delivering, and also possible to make multiple deliveries for\nsplitted delivering." - } - }, - "/shoppings/sellers/deliveries/{deliveryId}/journeys": { - "post": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "deliveryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged delivery's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the journey", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created journey", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney" - } - } - } - } - }, - "summary": "Create a new journey", - "description": "Create a new journey.\n\nCreate a new {@link IShoppingDeliveryJourney journey} of the\n{@link IShoppingDelivery delivery}.\n\nThis action may change the related {@link IShoppingOrderGood.state}.\nAlso, if the target journey's type is \"delivering\", whether the property\n{@link IShoppingDeliveryJourney.completed_at} is null or not affects to\nthe related goods' states. If the property is not null, the state becomes\n\"arrived\". Otherwise, the state becomes \"delivering\"." - } - }, - "/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}/complete": { - "put": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "deliveryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged delivery's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target journey's ", - "required": true - } - ], - "requestBody": { - "description": "Completion time of the journey", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney.IComplete" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Complete a journey", - "description": "Complete a journey.\n\nComplete a {@link IShoppingDeliveryJourney journey} of the\n{@link IShoppingDelivery delivery}. In other words, fills the\n{@link IShoppingDeliveryJourney.completed_at} property with current time.\n\nIf the target journey's type is \"delivering\", this action may change\nthe related {@link IShoppingOrderGood.state goods' states} to be \"arrived\"." - } - }, - "/shoppings/sellers/deliveries/{deliveryId}/journeys/{id}": { - "delete": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "deliveryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged delivery's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target journey's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Newly created journey" - } - }, - "summary": "Erase a journey", - "description": "Erase a journey.\n\nErase a {@link IShoppingDeliveryJourney journey} of the\n{@link IShoppingDelivery delivery}.\n\nIf erasing journey is the last one of the belonged delivery, this action\nmay change the related {@link IShoppingOrderGood.state}. By erasing the last\njourney, the state rolls back to the previous." - } - }, - "/shoppings/sellers/deliveries/{deliveryId}/shippers": { - "post": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "deliveryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged delivery's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the shipper", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeliveryShipper.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created shipper", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingDeliveryShipper" - } - } - } - } - }, - "summary": "Create a new shipper", - "description": "Create a new shipper.\n\nCreate a new {@link IShoppingDeliveryShipper shipper} of the\n{@link IShoppingDelivery delivery}.\n\nThis action does not affect to the related {@link IShoppingOrder orders} or\n{@link IShoppingOrderGood goods} like {@link IShoppingDeliveryJourney}\nor {@link IShoppingDeliveryPiece} case, but just informs to the\n{@link IShoppingCustomer customer}." - } - }, - "/shoppings/sellers/coupons": { - "post": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of the coupon", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCoupon.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created coupon", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCoupon" - } - } - } - } - }, - "summary": "Create a new coupon", - "description": "Create a new coupon.\n\nCreate a new {@link IShoppingCoupon coupon} with given information.\n\nBy the way, if you are a {@link IShoppingSeller seller}, you have to\nadd include direction's {@link IShoppingCouponSellerCriteria} or\n{@link IShoppingCouponSaleCriteria} condition. This is because only\n{@link IShoppingAdministrator administrators} can create a coupon\nwhich can be used throughout the market. Seller must limit the usage\nrange by his/her {@link IShoppingSale sale(s)}.\n\nOf course, when adminstrator is planning to make a general coupon\nthat can be used throughout the market, the administrator must\nget agree from the sellers who are going to be affected." - }, - "patch": { - "tags": [ - "Discount" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCoupon.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated coupons", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingCoupon" - } - } - } - } - }, - "summary": "List up every coupons", - "description": "List up every coupons.\n\nList up every {@link IShoppingCoupon coupons} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingCoupon.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingCoupon.IRequest.sort sort condition}.\n\nFor reference, if you are a {@link IShoppingCustomer customer}, then\nonly {@link IShoppingCouponTicket ticketable} coupons would be listed up.\nOtherwise, non-ticketable coupons would also be listed up." - } - }, - "/shoppings/sellers/coupons/{id}": { - "delete": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target coupon's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Erase a coupon", - "description": "Erase a coupon.\n\nErase a {@link IShoppingCoupon coupon} with given ID.\n\nFor reference, if there're some {@link IShoppingCouponTicket tickets}\nwhich are already issued from the target coupon, they would not be affected.\nThose tickets are still valid until their expration time." - }, - "get": { - "tags": [ - "Discount" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target coupon's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Coupon info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingCoupon" - } - } - } - } - }, - "summary": "Get a coupon info", - "description": "Get a coupon info.\n\nGet a {@link IShoppingCoupon coupon} information.\n\nIf you are a {@link IShoppingCustomer customer}, then only\n{@link IShoppingCouponTicket ticketable} coupons are accessible. Non\nticketable coupons cause 410 gone error. Otherwise you are a\n{@link IShoppingSeller seller} or {@link IShoppingAdministrator administrator},\nnon-ticketable coupons are also accessible." - } - }, - "/shoppings/sellers/orders": { - "patch": { - "tags": [ - "Order" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated orders", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingOrder" - } - } - } - } - }, - "summary": "List up every orders", - "description": "List up every orders.\n\nList up every {@link IShoppingOrder orders} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingOrder.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingOrder.IRequest.sort sort condition}.\n\nFor reference, if you are a {@link IShoppingCustomer customer}, then\nyou can list up your own orders, and it is not a matter whether the\norder has been {@link IShoppingOrderPublish.paid_at paid} or not.\n\nOtherwise you are a {@link IShoppingSeller seller} or\n{@link IShoppingAdministrator administrator}, then you can list up\nonly paid orders. Also, in the seller case, only related\n{@link IShoppingOrder.goods goods} would be listed up in the order." - } - }, - "/shoppings/sellers/orders/{id}": { - "get": { - "tags": [ - "Order" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target order's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Order info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingOrder" - } - } - } - } - }, - "summary": "Get an order info", - "description": "Get an order info.\n\nGet a detailed {@link IShoppingOrder order} information.\n\nIf you are not a {@link IShoppingCustomer customer}, then you can't\naccess to the order which has not been\n{@link IShoppingOrderPublish.paid_at paid} yet. In that case,\n404 not found error would be thrown." - } - }, - "/shoppings/sellers/sales": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [], - "requestBody": { - "description": "Creation info of the sale", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created sale", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Create a sale", - "description": "Create a sale.\n\n{@link IShoppingSeller Seller} creates a new {@link IShoppingSale} for\noperation.\n\nFor reference, sale has complicate hierarchical structure that composing\nwith {@link IShoppingSaleUnit units}, {@link IShoppingSaleUnitOption options}\nand {@link IShoppingSaleUnitStock stocks}. Therefore, I recommend you to\nread the {@link IShoppingSale} and related DTOs' documents before creating\na new sale.\n\nERD (Entity Relationship Diagram) and its description document also would\nbe helpful, too." - }, - "patch": { - "tags": [ - "Sale" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated sales with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSale.ISummary" - } - } - } - } - }, - "summary": "List up every summarized sales", - "description": "List up every summarized sales.\n\nList up every {@link IShoppingSale.ISummary summarized sales}.\n\nAs you can see, returned sales are summarized, not detailed. If you want\nto get the detailed information of a sale, use {@link at} function for\neach sale.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}s. Otherwise you're a\n{@link IShoppingCustomer customer}, you can see only the operating\nsales in the market. You can't see the unopened, closed, or suspended\nsales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSale.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingSale.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/sales/{id}": { - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "requestBody": { - "description": "New information of the sale", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleSnapshot.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Updated sale with new snapshot", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Update a sale", - "description": "Update a sale.\n\nUpdate a {@link IShoppingSale sale} with new information.\n\nBy the way, the sale actually does not being modified, but just make a new\n{@link IShoppingSaleSnapshot snapshot} record of the sale. Its 1st purpose\nis to keeping the integrity of the sale, due to modification of the sale\nmust not affect to the {@link IShoppingOrder orders} that already had been\napplied to the sale.\n\nThe 2nd purpose is for the A/B tests. {@link IShoppingSeller Seller} needs\nto demonstrate operating performance by chaning price, content, and\ncomposition of the product. This snapshot concept would be helpful for it." - }, - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed sale information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Get a sale info", - "description": "Get a sale info.\n\nGet a {@link IShoppingSale sale} with detailed information.\n\nIf you're a {@link IShoppingSeller seller}, you can only access to the\nyour own {@link IShoppingSale sale}. Otherwise you're a\n{@link IShoppingCustomer customer}, you can access to only the operating\nsales in the market. You can't access to the unopened, closed, or suspended\nsales." - } - }, - "/shoppings/sellers/sales/{id}/open": { - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "requestBody": { - "description": "New opening and closing time", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale.IUpdateOpeningTime" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Change opening and closing time of a sale", - "description": "Change opening and closing time of a sale.\n\nUpdate a {@link IShoppingSale sale}'s opening and closing time.\n\nBy the way, if the sale still be opened or closed, it is not possible to\nchange the opening time. In contrary, if the sale already had been opened\nbut still not closed, it is possible to change the closing time.\n\nOf course, if closing time is less than opening time or not,\n428 unprocessable entity error would be thrown." - } - }, - "/shoppings/sellers/sales/{id}/replica": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "201": { - "description": "Creation info of the sale for replication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale.ICreate" - } - } - } - } - }, - "summary": "Get replica of a sale", - "description": "Get replica of a sale.\n\nGet a {@link IShoppingSale.ICreate} typed info of the target sale for\nreplication.\n\nIt would be useful for creating a new replication\n{@link IShoppingSale sale} with similar innformatiopn." - } - }, - "/shoppings/sellers/sales/{id}/pause": { - "delete": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Pause a sale", - "description": "Pause a sale.\n\nPause a {@link IShoppingSale sale} from {@link open opened} state.\nTherefore, the sale can not be operated again until it be\n{@link restore restored}. By the way, {@link IShoppingCustomer customer}\nstill can sale from the {@link index} and {@link at} API endpints, but\n\"paused\" label would be attached.\n\nAlso, customer no more can put into the shopping cart, either.\nEven the sale already had been put into the shopping cart, the\n{@link IShoppingCartCommodity commodity} will not be listed on the\nshopping cart. Also, it is not possible to appling an\n{@link IShoppingOrder order} with the paused sale's commodity, either.\n\nBy the way, if the sale already had been applied to an order, the order\ncan be {@link IShoppingOrderPublish published} and\n{@link IShoppingSeller seller} must {@link IShoppingDelivery deliver} the\ngood to the customer." - } - }, - "/shoppings/sellers/sales/{id}/suspend": { - "delete": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Suspend a sale", - "description": "Suspend a sale.\n\nSuspend a {@link IShoppingSale sale} from {@link open opened} state.\nTherefore, the sale can not be operated again until it be\n{@link restore restored} and {@link IShoppingCustomer customer} cannot\nsee the sale from the {@link index} and {@link at} API.\n\nAlso, customer no more can put into the shopping cart, either.\nEven the sale already had been put into the shopping cart, the\n{@link IShoppingCartCommodity commodity} will not be listed on the\nshopping cart. Also, it is not possible to appling an\n{@link IShoppingOrder order} with the suspended sale's commodity, either.\n\nBy the way, if the sale already had been applied to an order, the order\ncan be {@link IShoppingOrderPublish published} and\n{@link IShoppingSeller seller} must {@link IShoppingDelivery deliver} the\ngood to the customer." - } - }, - "/shoppings/sellers/sales/{id}/restore": { - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "description": "Restore a sale\n\nRestore a {@link IShoppingSale sale} from {@link pause paused} or\n{@link suspend suspended} state\n\nTherefore the sale can be operated again if its\n{@link IShoppingSale.closed_at closing time} has not been reached.\nAlso, if a {@link IShoppingCustomer customer} had put the sale into the\nshopping cart when being paused or suspended, the\n{@link IShoppingCartCommodity commodity} will be listed again on the\nshopping cart." - } - }, - "/shoppings/sellers/sales/{saleId}/questions/{questionId}/answer": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "questionId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target question's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBbsArticle.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer" - } - } - } - } - }, - "summary": "Write an answer article", - "description": "Write an answer article.\n\nWrite a formal {@link IShoppingSaleInquiryAnswer answer article} to a\nspecific {@link IShoppingSaleInquiry question article} written by a\n{@link IShoppingCustomer}.\n\nNote that, this is the formal answer that can be written only one per\na question article (but {@link update updatable}). Therefore, it needs to\nguide the {@link IShoppingSeller seller} to write it carefully.\n\nAlso, as seller can write {@link IShoppingSaleInquiryComment comments} to\nthe question article as many as he/she wants, it would be useful for\nadditional communication." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "questionId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target question's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBbsArticle.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer.ISnapshot" - } - } - } - } - }, - "summary": "Update an answer article", - "description": "Update an answer article.\n\nUpdate a formal {@link IShoppingSaleInquiryAnswer answer article} to a\nspecific {@link IShoppingSaleInquiry question article} written by a\n{@link IShoppingCustomer}.\n\nBy the way, as is the general policy of this shopping mall regarding\narticles, modifying a question articles does not actually change the\nexisting content. Modified content is accumulated and recorded in the\nexisting article record as a new\n{@link IShoppingSaleInquiryAnswer.ISnapshot snapshot}. And this is made\npublic to everyone, including the {@link IShoppingCustomer customer} and the\n{@link IShoppingSeller seller}, and anyone who can view the article can\nalso view the entire editing histories.\n\nThis is to prevent customers or sellers from modifying their articles and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated inquiry comments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "List up every inquiry comments", - "description": "List up every inquiry comments.\n\nList up every {@link IShoppingSaleInquiryComment inquiry comments} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleInquiryComment.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleInquiryComment.IRequest.sort sort condition}.\n\nBy the way, if you're a {@link IShoppingSeller seller}, you can only access\nto the your own {@link IShoppingSale sale}'s inquiries. Otherwise, you\ncan access to every inquiries of the sales." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Create an inquiry comment", - "description": "Create an inquiry comment.\n\nCreate an {@link IShoppingSaleInquiryComment inquiry comment} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\ncreate an inquiry comment to your own {@link IShoppingSale sale}'s inquiry.\nOtherwise, you can create an inquiry comment to every inquiries of the sales." - } - }, - "/shoppings/sellers/sales/{saleId}/questions/{inquiryId}/comments/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed inquiry comment info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Get an inquiry comment info", - "description": "Get an inquiry comment info.\n\nGet a detailed {@link IShoppingSaleInquiryComment inquiry comment}\ninformation of a {@link IShoppingSaleQuestion question} or\n{@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s inquiry comment.\nOtherwise, you can access to every inquiry comments of the sales." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ISnapshot" - } - } - } - } - }, - "summary": "Update an inquiry comment", - "description": "Update an inquiry comment.\n\nUpdate an {@link IShoppingSaleInquiryComment inquiry comment} to a specific\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nBy the way, as is the general policy of this shopping mall regarding\ncomments, modifying a comment does not actually change the existing content.\nModified content is accumulated and recorded in the existing comment record\nas a new {@link IShoppingSaleInquiryComment.ISnapshot snapshot}. And this\nis made public to everyone, who can read this inquiry comment.\n\nThis is to prevent customers or sellers from modifying their comments and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/sellers/sales/{saleId}/questions": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated questions with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleQuestion.ISummary" - } - } - } - } - }, - "summary": "List up every summarized questions", - "description": "List up every summarized questions.\n\nList up every {@link IShoppingSaleQuestion.ISummary summarized questions} of a\n{@link IShoppingSale sale}.\n\nAs you can see, returned questions are summarized, not detailed. If you want\nto get the detailed information of a question, use {@link adridges} function\nor {@link at} function for each article.\n\nAlso, returned question has {@link IShoppingSaleQuestion.ISummary.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\nAdditionally, returned question has another special property\n{@link IShoppingSaleQuestion.ISummary.secret} with masking to other\nprincple properties, and it means only related actors can {@link at read}\nthe question.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s questions. Otherwise,\nyou can access to every questions of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleQuestion.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleQuestion.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/sales/{saleId}/questions/abridges": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated questions with abridged information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleQuestion.IAbridge" - } - } - } - } - }, - "summary": "List up every abridged questions", - "description": "List up every abridged questions.\n\nList up every {@link IShoppingSaleQuestion.IAbridge abridged questions} of\na {@link IShoppingSale sale}.\n\nAs you can see, returned questions are abridged, not detailed. If you want\nto get the detailed information of a question, use {@link at} function\nfor each article.\n\nAlso, returned question has {@link IShoppingSaleQuestion.IAridge.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\nAdditionally, returned question has another special property\n{@link IShoppingSaleQuestion.IAridge.secret} with masking to other\nprincple properties, and it means only related actors can {@link at read}\nthe question.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s questions. Otherwise,\nyou can access to every questions of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleQuestion.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleQuestion.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/sales/{saleId}/questions/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target question's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed question info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleQuestion" - } - } - } - } - }, - "summary": "Get a question info", - "description": "Get a question info.\n\nGet a detailed {@link IShoppingSaleQuestion question} information of a\n{@link IShoppingSale sale}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s question. Otherwise\nyou are a {@link IShoppingCustomer customer}, you can access to every\nquestions of the sales except the {@link IShoppingSaleQuestion.secret}\nvalue is `false`." - } - }, - "/shoppings/sellers/sales/{saleId}/reviews/{reviewId}/answer": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "reviewId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target review's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBbsArticle.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer" - } - } - } - } - }, - "summary": "Write an answer article", - "description": "Write an answer article.\n\nWrite a formal {@link IShoppingSaleInquiryAnswer answer article} to a\nspecific {@link IShoppingSaleInquiry review article} written by a\n{@link IShoppingCustomer}.\n\nNote that, this is the formal answer that can be written only one per\na review article (but {@link update updatable}). Therefore, it needs to\nguide the {@link IShoppingSeller seller} to write it carefully.\n\nAlso, as seller can write {@link IShoppingSaleInquiryComment comments} to\nthe review article as many as he/she wants, it would be useful for\nadditional communication." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "reviewId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target review's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IBbsArticle.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the answer article", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer.ISnapshot" - } - } - } - } - }, - "summary": "Update an answer article", - "description": "Update an answer article.\n\nUpdate a formal {@link IShoppingSaleInquiryAnswer answer article} to a\nspecific {@link IShoppingSaleInquiry review article} written by a\n{@link IShoppingCustomer}.\n\nBy the way, as is the general policy of this shopping mall regarding\narticles, modifying a review articles does not actually change the\nexisting content. Modified content is accumulated and recorded in the\nexisting article record as a new\n{@link IShoppingSaleInquiryAnswer.ISnapshot snapshot}. And this is made\npublic to everyone, including the {@link IShoppingCustomer customer} and the\n{@link IShoppingSeller seller}, and anyone who can view the article can\nalso view the entire editing histories.\n\nThis is to prevent customers or sellers from modifying their articles and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated inquiry comments", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "List up every inquiry comments", - "description": "List up every inquiry comments.\n\nList up every {@link IShoppingSaleInquiryComment inquiry comments} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}\nwith {@link IPage pagination}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleInquiryComment.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleInquiryComment.IRequest.sort sort condition}.\n\nBy the way, if you're a {@link IShoppingSeller seller}, you can only access\nto the your own {@link IShoppingSale sale}'s inquiries. Otherwise, you\ncan access to every inquiries of the sales." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry's ", - "required": true - } - ], - "requestBody": { - "description": "Creation info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Newly created inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Create an inquiry comment", - "description": "Create an inquiry comment.\n\nCreate an {@link IShoppingSaleInquiryComment inquiry comment} of a\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\ncreate an inquiry comment to your own {@link IShoppingSale sale}'s inquiry.\nOtherwise, you can create an inquiry comment to every inquiries of the sales." - } - }, - "/shoppings/sellers/sales/{saleId}/reviews/{inquiryId}/comments/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed inquiry comment info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - } - } - } - } - }, - "summary": "Get an inquiry comment info", - "description": "Get an inquiry comment info.\n\nGet a detailed {@link IShoppingSaleInquiryComment inquiry comment}\ninformation of a {@link IShoppingSaleQuestion question} or\n{@link IShoppingSaleReview review}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s inquiry comment.\nOtherwise, you can access to every inquiry comments of the sales." - }, - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "inquiryId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged inquiry's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target inquiry comment's ", - "required": true - } - ], - "requestBody": { - "description": "Update info of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Newly created snapshot record of the inquiry comment", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.ISnapshot" - } - } - } - } - }, - "summary": "Update an inquiry comment", - "description": "Update an inquiry comment.\n\nUpdate an {@link IShoppingSaleInquiryComment inquiry comment} to a specific\n{@link IShoppingSaleQuestion question} or {@link IShoppingSaleReview review}.\n\nBy the way, as is the general policy of this shopping mall regarding\ncomments, modifying a comment does not actually change the existing content.\nModified content is accumulated and recorded in the existing comment record\nas a new {@link IShoppingSaleInquiryComment.ISnapshot snapshot}. And this\nis made public to everyone, who can read this inquiry comment.\n\nThis is to prevent customers or sellers from modifying their comments and\nmanipulating the circumstances due to the nature of e-commerce, where\ndisputes easily arise. That is, to preserve evidence." - } - }, - "/shoppings/sellers/sales/{saleId}/reviews": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated reviews with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleReview.ISummary" - } - } - } - } - }, - "summary": "List up every summarized reviews", - "description": "List up every summarized reviews.\n\nList up every {@link IShoppingSaleReview.ISummary summarized reviews} of a\n{@link IShoppingSale sale}.\n\nAs you can see, returned reviews are summarized, not detailed. If you want\nto get the detailed information of a review, use {@link adridges} function\nor {@link at} function for each article.\n\nAlso, returned review has {@link IShoppingSaleReview.ISummary.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s reviews. Otherwise,\nyou can access to every reviews of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleReview.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleReview.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/sales/{saleId}/reviews/abridges": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated reviews with abridged information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleReview.IAbridge" - } - } - } - } - }, - "summary": "List up every abridged reviews", - "description": "List up every abridged reviews.\n\nList up every {@link IShoppingSaleReview.IAbridge abridged reviews} of\na {@link IShoppingSale sale}.\n\nAs you can see, returned reviews are abridged, not detailed. If you want\nto get the detailed information of a review, use {@link at} function\nfor each article.\n\nAlso, returned review has {@link IShoppingSaleReview.IAridge.answer}\nproperty which means the formal answer from the {@link IShoppingSeller}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s reviews. Otherwise,\nyou can access to every reviews of the sales.\n\nBy the way, if you want, you can limit the result by configuring\n{@link IShoppingSaleReview.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingSaleReview.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/sales/{saleId}/reviews/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target review's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed review info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleReview" - } - } - } - } - }, - "summary": "Get a review info", - "description": "Get a review info.\n\nGet a detailed {@link IShoppingSaleReview review} information of a\n{@link IShoppingSale sale}.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s review. Otherwise\nyou are a {@link IShoppingCustomer customer}, you can access to every\nreviews of the sales." - } - }, - "/shoppings/sellers/sales/{saleId}/snapshots/{id}/replica": { - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "201": { - "description": "Creation info of the sale for replication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale.ICreate" - } - } - } - } - }, - "summary": "Get replica of a snapshot", - "description": "Get replica of a snapshot.\n\nGet a {@link IShoppingSale.ICreate} typed info of the target\n{@link IShoppingSaleSnapshot snapshot} record for replication.\n\nIt would be useful for creating a new replication {@link IShoppingSale sale}\nfrom the old snapshot." - } - }, - "/shoppings/sellers/sales/{saleId}/snapshots": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target sale's ", - "required": true - } - ], - "requestBody": { - "description": "Requestion info of pagination", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPage.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated snapshots with summarized information", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleSnapshot.ISummary" - } - } - } - } - }, - "summary": "List up every snapshots", - "description": "List up every snapshots.\n\nWhenever {@link IShoppingSeller seller} updates a\n{@link IShoppingSale sale}, the sale record is not updated but a new\n{@link IShoppingSaleSnapshot snapshot} record is created to keep the\nintegrity of the sale history. This API function is for listing up\nsuch snapshot records.\n\nAlso, as you can see from the return type, returned snapshots are\nsummarized, not detailed. If you want to get the detailed information\nof a snapshot, use {@link at} or {@link flipo} function for each snapshot.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s snapshots. Otherwise,\nyou can access to every snapshots of the sales even though the sale has\nbeen closed or suspended." - } - }, - "/shoppings/sellers/sales/{saleId}/snapshots/{id}": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed information of the snapshot", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleSnapshot" - } - } - } - } - }, - "summary": "Get a snapshot info", - "description": "Get a snapshot info.\n\nGet a {@link IShoppingSaleSnapshot snapshot} with detailed information.\n\nAs you can see from the return type, returned snapshot does not contain\nthe {@link IShoppingSale sale} info. If you want to get the sale info,\nuse the {@link flip} function instead.\n\nFor reference, if you're a {@link IShoppingSeller seller}, you can only\naccess to the your own {@link IShoppingSale sale}'s snapshots. Otherwise,\nyou can access to every snapshots of the sales even though the sale has\nbeen closed or suspended." - } - }, - "/shoppings/sellers/sales/{saleId}/snapshots/{id}/flip": { - "get": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target snapshot's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed sale information in the snapshot side", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSale" - } - } - } - } - }, - "summary": "Get a flipped snapshot info", - "description": "Get a flipped snapshot info.\n\nGet a {@link IShoppingSale sale} info of a flipped snapshot.\n\nAs you can see from the return type, this function returns the\n{@link IShoppingSale sale} info. By the way, the sale info is not the\nlatest one, but a flipped info in the snapshot side.\n\nAlso, if you're a {@link IShoppingSeller seller}, you can only access to\nthe your own {@link IShoppingSale sale}'s snapshots. Otherwise, you can\naccess to every snapshots of the sales even though the sale has been\nclosed or suspended." - } - }, - "/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements": { - "patch": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "unitId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged unit's ", - "required": true - }, - { - "name": "stockId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target stock's ", - "required": true - } - ], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockSupplement.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated supplements", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSaleUnitStockSupplement" - } - } - } - } - }, - "summary": "List up every supplements", - "description": "List up every supplements.\n\nList up every {@link IShoppingSaleUnitStockSupplement supplement histories}\nof a specific {@link IShoppingSaleUnitStock stock}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSaleUnitStockSupplement.IRequest.search search condition} in\nthe request body. Also, it is possible to customize sequence order of\nrecords by configuring {@link IShoppingSaleUnitStockSupplement.IRequest.sort}\nproperty." - }, - "post": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "unitId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged unit's ", - "required": true - }, - { - "name": "stockId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target stock's ", - "required": true - } - ], - "requestBody": { - "description": "Ceate info of the supplement", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockSupplement.ICreate" - } - } - }, - "required": true - }, - "responses": { - "201": { - "description": "Created supplement", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockSupplement" - } - } - } - } - }, - "summary": "Create a supplement", - "description": "Create a supplement.\n\nCreate a {@link IShoppingSaleUnitStockSupplement supplement history} of a\nspecific {@link IShoppingSaleUnitStock stock}.\n\nTherefore, {@link IShoppingSaleUnitStockInventory.income inventory} of the\ntarget stock will be increased by the\n{@link IShoppingSaleUnitStockSupplement.value supplement's value}." - } - }, - "/shoppings/sellers/sales/{saleId}/units/{unitId}/stocks/{stockId}/supplements/{id}": { - "put": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "unitId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged unit's ", - "required": true - }, - { - "name": "stockId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target stock's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target supplement's ", - "required": true - } - ], - "requestBody": { - "description": "Update info (quantity) of the supplement", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockSupplement.ICreate" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "" - } - }, - "summary": "Update a supplement", - "description": "Update a supplement.\n\nUpdate quantity value of a {@link IShoppingSaleUnitStockSupplement supplement}\nof a specific {@link IShoppingSaleUnitStock stock}.\n\nTherefore, {@link IShoppingSaleUnitStockInventory.income inventory} of the\ntarget stock will be changed by the\n{@link IShoppingSaleUnitStockSupplement.value supplement's value}." - }, - "delete": { - "tags": [ - "Sale" - ], - "parameters": [ - { - "name": "saleId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged sale's ", - "required": true - }, - { - "name": "unitId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Belonged unit's ", - "required": true - }, - { - "name": "stockId", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target stock's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target supplement's ", - "required": true - } - ], - "responses": { - "200": { - "description": "" - } - }, - "summary": "Erase a supplement", - "description": "Erase a supplement.\n\nErase a {@link IShoppingSaleUnitStockSupplement supplement} of a specific\n{@link IShoppingSaleUnitStock stock}.\n\nTherefore, {@link IShoppingSaleUnitStockInventory.income inventory} of the\ntarget stock will be decreased by the\n{@link IShoppingSaleUnitStockSupplement.value supplement's value}." - } - }, - "/shoppings/sellers/systematic/channels/{channelCode}/categories": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Paginated categories with children categories", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IHierarchical" - } - } - } - } - } - }, - "summary": "List up every categories with children records", - "description": "List up every categories with children records.\n\nList up every {@link IShoppingChannelCategory.IHierarchical categories}\nof a {@link IShoppingChannel channel} with pagination. Returned categories\ncontain children categories, too.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannelCategory.IRequest.search search condition} in the\nrequest body. Also, it is possible to customize sequence order of records\nby configuring {@link IShoppingChannelCategory.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target category's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed category info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory" - } - } - } - } - }, - "summary": "Get a category info", - "description": "Get a category info.\n\nGet a detailed {@link IShoppingChannelCategory category} information.\n\nReturned category contains hierarchical children categories, and also\ncontains the recursive parent categories, too." - } - }, - "/shoppings/sellers/systematic/channels/{channelCode}/categories/{id}/invert": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "channelCode", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Belonged channel's ", - "required": true - }, - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target category's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed category info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - } - } - } - } - }, - "summary": "Get a category info of inverted", - "description": "Get a category info of inverted.\n\nGet a inverted {@link IShoppingChannelCategory.IInvert category} information.\n\nReturned category contains the recursive parent categories, but not contains\nthe hierarchical children categories." - } - }, - "/shoppings/sellers/systematic/channels": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated channels", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingChannel" - } - } - } - } - }, - "summary": "List up every channels", - "description": "List up every channels.\n\nList up every {@link IShoppingChannel channels} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannel.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingChannel.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/systematic/channels/hierarchical": { - "patch": { - "tags": [ - "Systematic" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated channels with nested categories", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "List up every channels with nested categories", - "description": "List up every channels with nested categories.\n\nList up every {@link IShoppingChannel.IHierarchical channels} with\n{@link IPage pagination}. Returned channels contain nested hierarchical\n{@link IShoppingChannelCategory.IHierarchical categories}.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingChannel.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingChannel.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/systematic/channels/{id}": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed channel info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "Get a channel info", - "description": "Get a channel info.\n\nGet a detailed {@link IShoppingChannel.IHierarchical channel} information.\n\nReturned channel instance also contains the nested\n{@link IShoppingChannelCategory.IHierarchical hierarchical category}\ninformations." - } - }, - "/shoppings/sellers/systematic/channels/{code}/get": { - "get": { - "tags": [ - "Systematic" - ], - "parameters": [ - { - "name": "code", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target channel's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed channel info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - } - } - } - } - }, - "summary": "Get a channel info by its code", - "description": "Get a channel info by its code.\n\nGet a detailed {@link IShoppingChannel.IHierarchical channel} information\nby its code.\n\nReturned channel instance also contains the nested\n{@link IShoppingChannelCategory.IHierarchical hierarchical category}\ninformations." - } - }, - "/shoppings/sellers/systematic/sections": { - "patch": { - "tags": [ - "Section" - ], - "parameters": [], - "requestBody": { - "description": "Request info of pagination, searching and sorting", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection.IRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Paginated sections", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPageIShoppingSection" - } - } - } - } - }, - "summary": "List up every sections", - "description": "List up every sections.\n\nList up every {@link IShoppingSection sections} with pagination.\n\nIf you want, you can limit the result by configuring\n{@link IShoppingSection.IRequest.search search condition} in the request\nbody. Also, it is possible to customize sequence order of records by\nconfiguring {@link IShoppingSection.IRequest.sort sort condition}." - } - }, - "/shoppings/sellers/systematic/sections/{id}": { - "get": { - "tags": [ - "Section" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Target section's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed section info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Get a section info", - "description": "Get a section info.\n\nGet a detailed {@link IShoppingSection section} information." - } - }, - "/shoppings/sellers/systematic/sections/{code}/get": { - "get": { - "tags": [ - "Section" - ], - "parameters": [ - { - "name": "code", - "in": "path", - "schema": { - "type": "string" - }, - "description": "Target section's ", - "required": true - } - ], - "responses": { - "200": { - "description": "Detailed section info", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IShoppingSection" - } - } - } - } - }, - "summary": "Get a section info by its code", - "description": "Get a section info by its code.\n\nGet a detailed {@link IShoppingSection section} information by its code." - } - } - }, - "components": { - "schemas": { - "IPerformance": { - "type": "object", - "properties": { - "cpu": { - "$ref": "#/components/schemas/process.global.NodeJS.CpuUsage" - }, - "memory": { - "$ref": "#/components/schemas/process.global.NodeJS.MemoryUsage" - }, - "resource": { - "$ref": "#/components/schemas/process.global.NodeJS.ResourceUsage" - } - }, - "required": [ - "cpu", - "memory", - "resource" - ] - }, - "process.global.NodeJS.CpuUsage": { - "type": "object", - "properties": { - "user": { - "type": "number" - }, - "system": { - "type": "number" - } - }, - "required": [ - "user", - "system" - ] - }, - "process.global.NodeJS.MemoryUsage": { - "type": "object", - "properties": { - "rss": { - "type": "number", - "description": "Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the\nprocess, including all C++ and JavaScript objects and code." - }, - "heapTotal": { - "type": "number", - "title": "Refers to V8's memory usage", - "description": "Refers to V8's memory usage." - }, - "heapUsed": { - "type": "number", - "title": "Refers to V8's memory usage", - "description": "Refers to V8's memory usage." - }, - "external": { - "type": "number" - }, - "arrayBuffers": { - "type": "number", - "description": "Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included\nin the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s\nmay not be tracked in that case." - } - }, - "required": [ - "rss", - "heapTotal", - "heapUsed", - "external", - "arrayBuffers" - ] - }, - "process.global.NodeJS.ResourceUsage": { - "type": "object", - "properties": { - "fsRead": { - "type": "number" - }, - "fsWrite": { - "type": "number" - }, - "involuntaryContextSwitches": { - "type": "number" - }, - "ipcReceived": { - "type": "number" - }, - "ipcSent": { - "type": "number" - }, - "majorPageFault": { - "type": "number" - }, - "maxRSS": { - "type": "number" - }, - "minorPageFault": { - "type": "number" - }, - "sharedMemorySize": { - "type": "number" - }, - "signalsCount": { - "type": "number" - }, - "swappedOut": { - "type": "number" - }, - "systemCPUTime": { - "type": "number" - }, - "unsharedDataSize": { - "type": "number" - }, - "unsharedStackSize": { - "type": "number" - }, - "userCPUTime": { - "type": "number" - }, - "voluntaryContextSwitches": { - "type": "number" - } - }, - "required": [ - "fsRead", - "fsWrite", - "involuntaryContextSwitches", - "ipcReceived", - "ipcSent", - "majorPageFault", - "maxRSS", - "minorPageFault", - "sharedMemorySize", - "signalsCount", - "swappedOut", - "systemCPUTime", - "unsharedDataSize", - "unsharedStackSize", - "userCPUTime", - "voluntaryContextSwitches" - ] - }, - "ISystem": { - "type": "object", - "properties": { - "uid": { - "type": "number", - "title": "Random Unique ID", - "description": "Random Unique ID." - }, - "arguments": { - "type": "array", - "items": { - "type": "string" - }, - "description": "`process.argv`" - }, - "commit": { - "$ref": "#/components/schemas/ISystem.ICommit", - "title": "Git commit info", - "description": "Git commit info." - }, - "package": { - "$ref": "#/components/schemas/ISystem.IPackage", - "description": "`package.json`" - }, - "created_at": { - "type": "string", - "title": "Creation time of this server", - "description": "Creation time of this server." - } - }, - "required": [ - "uid", - "arguments", - "commit", - "package", - "created_at" - ], - "description": "System Information." - }, - "ISystem.ICommit": { - "type": "object", - "properties": { - "shortHash": { - "type": "string" - }, - "branch": { - "type": "string" - }, - "hash": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "sanitizedSubject": { - "type": "string" - }, - "body": { - "type": "string" - }, - "author": { - "$ref": "#/components/schemas/ISystem.ICommit.IUser" - }, - "committer": { - "$ref": "#/components/schemas/ISystem.ICommit.IUser" - }, - "authored_at": { - "type": "string" - }, - "commited_at": { - "type": "string" - }, - "notes": { - "type": "string" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "shortHash", - "branch", - "hash", - "subject", - "sanitizedSubject", - "body", - "author", - "committer", - "authored_at", - "commited_at", - "tags" - ], - "description": "Git commit info." - }, - "ISystem.ICommit.IUser": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "required": [ - "name", - "email" - ], - "description": "Git user account info." - }, - "ISystem.IPackage": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "description": { - "type": "string" - }, - "main": { - "type": "string" - }, - "typings": { - "type": "string" - }, - "scripts": { - "$ref": "#/components/schemas/Recordstringstring" - }, - "repository": { - "type": "object", - "properties": { - "type": { - "const": "git" - }, - "url": { - "type": "string" - } - }, - "required": [ - "type", - "url" - ] - }, - "author": { - "type": "string" - }, - "license": { - "type": "string" - }, - "bugs": { - "type": "object", - "properties": { - "url": { - "type": "string" - } - }, - "required": [ - "url" - ] - }, - "homepage": { - "type": "string" - }, - "devDependencies": { - "$ref": "#/components/schemas/Recordstringstring" - }, - "dependencies": { - "$ref": "#/components/schemas/Recordstringstring" - }, - "publishConfig": { - "type": "object", - "properties": { - "registry": { - "type": "string" - } - }, - "required": [ - "registry" - ] - }, - "files": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "name", - "version", - "description", - "scripts", - "repository", - "author", - "license", - "bugs", - "homepage", - "dependencies" - ], - "description": "NPM package info." - }, - "Recordstringstring": { - "type": "object", - "properties": {}, - "description": "Construct a type with a set of properties K of type T", - "additionalProperties": { - "type": "string" - } - }, - "IShoppingAdministrator.IInvert": { - "type": "object", - "properties": { - "type": { - "const": "administrator", - "title": "Discriminant for the type of customer", - "description": "Discriminant for the type of customer." - }, - "member": { - "$ref": "#/components/schemas/IShoppingMember.IInvert", - "title": "Membership joining information", - "description": "Membership joining information." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer.IInvert", - "title": "Customer, the connection information", - "description": "Customer, the connection information." - }, - "citizen": { - "$ref": "#/components/schemas/IShoppingCitizen", - "title": "Real-name and mobile number authentication information", - "description": "Real-name and mobile number authentication information." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record.\n\nAnother words, the time when the administrator has signed up." - } - }, - "required": [ - "type", - "member", - "customer", - "citizen", - "id", - "created_at" - ], - "description": "Invert information starting from administrator info.\n\nInstead of accessing to the administrator information from the\n{@link IShoppingCustomer.member} -> {@link IShoppingMember.administrator},\n`IShoppingAdministrator.IInvert` starts from the administrator information\nand access to the customer, member and {@link IShoppingCitizen citizen}\ninformations inversely." - }, - "IShoppingMember.IInvert": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "nickname": { - "type": "string", - "title": "Nickname that uniquely identifies the member", - "description": "Nickname that uniquely identifies the member." - }, - "emails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingMemberEmail" - }, - "title": "List of emails", - "description": "List of emails." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record.\n\nAnother words, the time when the member has signed up." - } - }, - "required": [ - "id", - "nickname", - "emails", - "created_at" - ], - "description": "Invert information of member.\n\nThis invert member information has been designed to be used for another\ninvert informations of sellers and administrators like below.\n\n- {@link IShoppingSeller.IInvert}\n- {@link IShoppingAdministrator.IInvert}" - }, - "IShoppingMemberEmail": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "value": { - "type": "string", - "format": "email", - "title": "Email address value", - "description": "Email address value." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - } - }, - "required": [ - "id", - "value", - "created_at" - ], - "description": "Email address of member.\n\nThis shopping mall system allows multiple email addresses to be\nregistered for one {@link IShoppingMember member}. If you don't have to\nplan such multiple email addresses, just use only one." - }, - "IShoppingCustomer.IInvert": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "channel": { - "$ref": "#/components/schemas/IShoppingChannel", - "title": "Belonged channel", - "description": "Belonged channel." - }, - "external_user": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingExternalUser" - } - ], - "title": "External user information", - "description": "External user information.\n\nWhen the customer has come frome an external service." - }, - "href": { - "type": "string", - "format": "uri", - "title": "Connection address", - "description": "Connection address.\n\nSame with {@link window.location.href} of client." - }, - "referrer": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uri" - } - ], - "title": "Referrer address", - "description": "Referrer address.\n\nSame with {@link window.document.referrer} of client." - }, - "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ], - "title": "Connection IP Address", - "description": "Connection IP Address." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the connection record", - "description": "Creation time of the connection record." - } - }, - "required": [ - "id", - "channel", - "external_user", - "href", - "referrer", - "ip", - "created_at" - ], - "description": "Inverted customer informatino.\n\nThis inverted customer information has been designed to be used for\nanother invert informations of sellers and administrators like below.\n\n- {@link IShoppingSeller.IInvert}\n- {@link IShoppingAdministrator.IInvert}" - }, - "IShoppingChannel": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - }, - "code": { - "type": "string", - "title": "Identifier code", - "description": "Identifier code." - }, - "name": { - "type": "string", - "title": "Name of the channel", - "description": "Name of the channel." - } - }, - "required": [ - "id", - "created_at", - "code", - "name" - ], - "description": "Channel information.\n\n`IShoppingChannel` is a concept that shapes the distribution channel in the\nmarket. Therefore, the difference in the channel in this e-commerce system\nmeans that it is another site or application.\n\nBy the way, if your shopping mall system requires only one channel, then\njust use only one. This concept is designed to be expandable in the future." - }, - "IShoppingExternalUser": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "citizen": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingCitizen" - } - ], - "title": "Citizen activation info", - "description": "Citizen activation info." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record.\n\nAnother word, first time when the external user connected." - }, - "application": { - "type": "string", - "title": "Identifier code of the external service", - "description": "Identifier code of the external service.\n\nIt can be same with {@link IShoppingChannel.code} in common." - }, - "uid": { - "type": "string", - "title": "Identifier key of external user from the external system", - "description": "Identifier key of external user from the external system." - }, - "nickname": { - "type": "string", - "title": "Nickname of external user in the external system", - "description": "Nickname of external user in the external system." - }, - "data": { - "description": "Additional information about external user from the external\nsystem." - } - }, - "required": [ - "id", - "citizen", - "created_at", - "application", - "uid", - "nickname", - "data" - ], - "description": "External user information.\n\n`IShoppingExternalUser` is an entity dsigned for when this system needs\nto connect with external services and welcome their users as\n{@link IShoppingCustomer customers} of this service.\n\nFor reference, customers who connect from an external service must have\nthis record, and the external service user is identified through the two\nattributes {@link application} and {@link uid}. If a customer connected\nfrom an external service completes\n{@link IShoppingCitizen real-name authentication} from this service, each\ntime the external service user reconnects to this service and issues a\nnew customer authentication token, real-name authentication begins with\ncompleted.\n\nAnd {@link password} is the password issued to the user by the external\nservice system (the so-called permanent user authentication token), and\nis never the actual user password. However, for customers who entered the\nsame application and uid as the current external system user, this is to\ndetermine whether to view this as a correct external system user or a\nviolation.\n\nIn addition, additional information received from external services can\nbe recorded in the data field in JSON format." - }, - "IShoppingCitizen": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - }, - "mobile": { - "type": "string", - "pattern": "^[0-9]*$", - "title": "Mobile number", - "description": "Mobile number." - }, - "name": { - "type": "string", - "title": "Real name, or equivalent nickname", - "description": "Real name, or equivalent nickname." - } - }, - "required": [ - "id", - "created_at", - "mobile", - "name" - ], - "description": "Citizen verification information.\n\n`IShoppingCitizen` is an entity that records the user's\n{@link name real name} and {@link mobile} input information.\n\nFor reference, in South Korea, real name authentication is required for\ne-commerce participants, so the name attribute is important. However, the\nsituation is different overseas, so in reality, mobile attributes are the\nmost important, and identification of individual person is also done based\non this mobile.\n\nOf course, real name and mobile phone authentication information are\nencrypted and stored." - }, - "IShoppingAdministrator.IJoin": { - "type": "object", - "properties": {}, - "description": "Joining request info." - }, - "IShoppingMember.ILogin": { - "type": "object", - "properties": { - "email": { - "type": "string", - "format": "email", - "title": "Email address of member", - "description": "Email address of member.\n\nIf the member has multiple email addresses, just use one of them." - }, - "password": { - "type": "string", - "title": "Password of the member account", - "description": "Password of the member account." - } - }, - "required": [ - "email", - "password" - ], - "description": "Login request info." - }, - "IShoppingCoupon.ICreate": { - "type": "object", - "properties": { - "discount": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingCouponDiscount.IAmount" - }, - { - "$ref": "#/components/schemas/IShoppingCouponDiscount.IPercent" - } - ], - "title": "Discount information", - "description": "Discount information." - }, - "restriction": { - "$ref": "#/components/schemas/IShoppingCouponRestriction", - "title": "Restriction information", - "description": "Restriction information." - }, - "criterias": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingCouponChannelCriteria.ICreate" - }, - { - "$ref": "#/components/schemas/IShoppingCouponSectionCriteria.ICreate" - }, - { - "$ref": "#/components/schemas/IShoppingCouponSellerCriteria.ICreate" - }, - { - "$ref": "#/components/schemas/IShoppingCouponSaleCriteria.ICreate" - }, - { - "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria.ICreate" - } - ] - } - }, - "disposable_codes": { - "type": "array", - "items": { - "type": "string" - } - }, - "name": { - "type": "string", - "title": "Representative name of the coupon", - "description": "Representative name of the coupon." - }, - "opened_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Opening time of the coupon", - "description": "Opening time of the coupon." - }, - "closed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Closing time of the coupon", - "description": "Closing time of the coupon.\n\nTickets cannot be issued after this time.\n\nHowever, previously issued tickets can still be used until their\nexpiration date." - } - }, - "required": [ - "discount", - "restriction", - "criterias", - "disposable_codes", - "name", - "opened_at", - "closed_at" - ], - "description": "Creation information of the coupon." - }, - "IShoppingCouponDiscount.IAmount": { - "type": "object", - "properties": { - "unit": { - "const": "amount", - "title": "Discount unit as amount", - "description": "Discount unit as amount.\n\nIt means the order price would be discounted by the amount value." - }, - "value": { - "type": "number", - "title": "Discount value as amount", - "description": "Discount value as amount." - }, - "threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "number", - "minimum": 0 - } - ], - "title": "Minimum purchase amount for discount", - "description": "Minimum purchase amount for discount.\n\nWhen setting this value, discount coupons cannot be applied to\norder totals that are less than this value." - }, - "limit": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - } - ], - "title": "Maximum amount available for discount", - "description": "Maximum amount available for discount.\n\nWhen this value is set, no further discount will be given no\nmatter how much you order. This property would be meaningful\nonly when the {@link multiplicative} is `true`." - }, - "multiplicative": { - "type": "boolean", - "title": "Multiplicative or not", - "description": "Multiplicative or not.\n\nIf this property is `true`, the discount value would be multiplied\nto the {@link IShoppingCartCommodity.volume} or\n{@link IShoppingOrderGood.volume} value. Also, in that case,\nthe {@link limit} property would be meaningful." - } - }, - "required": [ - "unit", - "value", - "threshold", - "limit", - "multiplicative" - ], - "description": "Discount information with amount unit." - }, - "IShoppingCouponDiscount.IPercent": { - "type": "object", - "properties": { - "unit": { - "const": "percent", - "title": "Discount unit as percent", - "description": "Discount unit as percent.\n\nIt means the order price would be discounted by the percent value." - }, - "value": { - "type": "number", - "minimum": 0, - "maximum": 100, - "title": "Discount value as percent", - "description": "Discount value as percent." - }, - "threshold": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "number", - "minimum": 0 - } - ], - "title": "Minimum purchase amount for discount", - "description": "Minimum purchase amount for discount.\n\nWhen setting this value, discount coupons cannot be applied to\norder totals that are less than this value." - }, - "limit": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "number", - "exclusiveMinimum": true, - "minimum": 0 - } - ], - "title": "Maximum amount available for discount", - "description": "Maximum amount available for discount.\n\nWhen this value is set, no further discount will be given no\nmatter how much you order." - } - }, - "required": [ - "unit", - "value", - "threshold", - "limit" - ], - "description": "Discount information with percent unit." - }, - "IShoppingCouponRestriction": { - "type": "object", - "properties": { - "access": { - "oneOf": [ - { - "const": "public" - }, - { - "const": "private" - } - ], - "title": "Access level of coupon", - "description": "Access level of coupon.\n\n- public: possible to find from public API\n- private: unable to find from public API\n - arbitrarily assigned by the seller or administrator\n - issued from one-time link" - }, - "exclusive": { - "type": "boolean", - "title": "Exclusivity or not", - "description": "Exclusivity or not.\n\nAn exclusive discount coupon refers to a discount coupon that has an\nexclusive relationship with other discount coupons and can only be\nused alone. That is, when an exclusive discount coupon is used, no\nother discount coupon can be used for the same\n{@link IShoppingOrder order} or {@link IShoppingOrderGood good}.\n\nPlease note that this exclusive attribute is a very different concept\nfrom multiplicative, which means whether the same coupon can be\nmultiplied and applied to multiple coupons of the same order, so\nplease do not confuse them." - }, - "volume": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "integer" - } - ], - "title": "Limited quantity issued", - "description": "Limited quantity issued.\n\nIf there is a limit to the quantity issued, it becomes impossible to issue tickets exceeding this value.\n\nIn other words, the concept of N coupons being issued on a first-come, first-served basis is created." - }, - "volume_per_citizen": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "integer" - } - ], - "title": "Limited quantity issued per person", - "description": "Limited quantity issued per person.\n\nAs a limit to the total amount of issuance per person, it is common to assign 1 to limit duplicate issuance to the same citizen, or to use the NULL value to set no limit.\n\nOf course, by assigning a value of N, the total amount issued to the same citizen can be limited." - }, - "expired_in": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "integer" - } - ], - "title": "Expiration day(s) value", - "description": "Expiration day(s) value.\n\nThe concept of expiring N days after a discount coupon ticket is issued.\n\nTherefore, customers must use the ticket within N days, if possible, from the time it is issued." - }, - "expired_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Expiration date", - "description": "Expiration date.\n\nA concept that expires after YYYY-MM-DD after a discount coupon ticket is issued.\n\nDouble restrictions are possible with expired_in, of which the one with the shorter expiration date is used." - } - }, - "required": [ - "access", - "exclusive", - "volume", - "volume_per_citizen", - "expired_in", - "expired_at" - ], - "description": "Restriction information of the coupon." - }, - "IShoppingCouponChannelCriteria.ICreate": { - "type": "object", - "properties": { - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponChannelCriteria.IChannelTo.ICreate" - }, - "minItems": 1, - "title": "List of target channels and categories", - "description": "List of target channels and categories." - }, - "type": { - "const": "channel" - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ] - } - }, - "required": [ - "channels", - "type", - "direction" - ], - "description": "Creation information of the channel criteria." - }, - "IShoppingCouponChannelCriteria.IChannelTo.ICreate": { - "type": "object", - "properties": { - "channel_code": { - "type": "string", - "title": "Target channel's {@link IShoppingChannel.code}", - "description": "Target channel's {@link IShoppingChannel.code}." - }, - "category_ids": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - ], - "title": "Target categories' {@link IShoppingChannelCategory.id}s", - "description": "Target categories' {@link IShoppingChannelCategory.id}s." - } - }, - "required": [ - "channel_code", - "category_ids" - ], - "description": "Target channel and categories." - }, - "IShoppingCouponSectionCriteria.ICreate": { - "type": "object", - "properties": { - "section_codes": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "title": "List of target section's {@link IShoppingSection.code}s", - "description": "List of target section's {@link IShoppingSection.code}s." - }, - "type": { - "const": "section" - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ] - } - }, - "required": [ - "section_codes", - "type", - "direction" - ], - "description": "Creation information of the section criteria." - }, - "IShoppingCouponSellerCriteria.ICreate": { - "type": "object", - "properties": { - "seller_ids": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 1, - "title": "List of target seller's {@link IShoppingSeller.id}s", - "description": "List of target seller's {@link IShoppingSeller.id}s." - }, - "type": { - "const": "seller" - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ] - } - }, - "required": [ - "seller_ids", - "type", - "direction" - ], - "description": "Creation information of the seller criteria." - }, - "IShoppingCouponSaleCriteria.ICreate": { - "type": "object", - "properties": { - "sale_ids": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "minItems": 1, - "title": "List of target sale's {@link IShoppingSale.id}s", - "description": "List of target sale's {@link IShoppingSale.id}s." - }, - "type": { - "const": "sale" - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ] - } - }, - "required": [ - "sale_ids", - "type", - "direction" - ], - "description": "Creation information of the sale criteria." - }, - "IShoppingCouponFunnelCriteria.ICreate": { - "type": "object", - "properties": { - "funnels": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria.IValueFunnel" - }, - { - "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria.IVariableFunnel" - } - ] - }, - "minItems": 1, - "title": "List of target funnels", - "description": "List of target funnels." - }, - "type": { - "const": "funnel" - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ] - } - }, - "required": [ - "funnels", - "type", - "direction" - ], - "description": "Creation information of the funnel criteria." - }, - "IShoppingCouponFunnelCriteria.IValueFunnel": { - "type": "object", - "properties": { - "kind": { - "oneOf": [ - { - "const": "url" - }, - { - "const": "referrer" - } - ], - "title": "Kind of funnel restriction", - "description": "Kind of funnel restriction." - }, - "value": { - "type": "string", - "title": "Target value", - "description": "Target value." - } - }, - "required": [ - "kind", - "value" - ], - "description": "Kind of funnel restriction by a value." - }, - "IShoppingCouponFunnelCriteria.IVariableFunnel": { - "type": "object", - "properties": { - "kind": { - "const": "variable", - "title": "Kind of funnel restriction", - "description": "Kind of funnel restriction." - }, - "key": { - "type": "string", - "title": "Target variable's key", - "description": "Target variable's key." - }, - "value": { - "type": "string", - "title": "Target variable's value", - "description": "Target variable's value." - } - }, - "required": [ - "kind", - "key", - "value" - ], - "description": "Kind of funnel restriction by a variable." - }, - "IShoppingCoupon": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "designer": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingSeller" - }, - { - "$ref": "#/components/schemas/IShoppingAdministrator" - } - ], - "title": "Designer who've made the coupon", - "description": "Designer who've made the coupon." - }, - "inventory": { - "$ref": "#/components/schemas/IShoppingCouponInventory", - "title": "Inventory information", - "description": "Inventory information." - }, - "criterias": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponCriteria" - }, - "title": "List of criteria informations", - "description": "List of criteria informations." - }, - "discount": { - "$ref": "#/components/schemas/IShoppingCouponDiscount", - "title": "Discount information", - "description": "Discount information." - }, - "restriction": { - "$ref": "#/components/schemas/IShoppingCouponRestriction", - "title": "Restriction information", - "description": "Restriction information." - }, - "name": { - "type": "string", - "title": "Representative name of the coupon", - "description": "Representative name of the coupon." - }, - "opened_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Opening time of the coupon", - "description": "Opening time of the coupon." - }, - "closed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Closing time of the coupon", - "description": "Closing time of the coupon.\n\nTickets cannot be issued after this time.\n\nHowever, previously issued tickets can still be used until their\nexpiration date." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation tie of the record", - "description": "Creation tie of the record." - } - }, - "required": [ - "id", - "designer", - "inventory", - "criterias", - "discount", - "restriction", - "name", - "opened_at", - "closed_at", - "created_at" - ], - "description": "Discount coupon.\n\n`IShoppingCoupon` is an entity that symbolizes discount coupons at\na shopping mall.\n\nNote that, `IShoppingCoupon` only contains specification information\nabout discount coupons. Please keep in mind that this is a different\nconcept from {@link IShoppingCouponTicket}, which refers to the issuance\nof a discount coupon, or {@link IShoppingCouponTicketPayment}, which\nrefers to its payment.\n\nAdditionally, discount coupons are applied on an order-by-order basis,\nbut each has its own unique restrictions. For example, a coupon with\n{@link IShoppingCouponSellerCriteria} may or may not be used only for\n{@link IShoppingSale} of listings registered by the {@link IShoppingSeller}.\nAlso, there are restrictions such as\n{@link IShoppingCouponDiscount.threshold minimum amount restrictions} for\nusing discount coupons and\n{@link IShoppingCouponDiscount.limit maximum discount amount limits}.\n\nIn addition, you can set whether to issue discount coupons publicly or\ngive them only to people who know the specific issuing code. In addition,\nthere are restrictions such as issued discount coupons having an\n{@link IShoppingCouponRestriction.expired_at expiration date} or being\nissued only to customers who came in through a\n{@link IShoppingCouponFunnelCriteria specific funnel}.\n\nFor more information, please refer to the properties below and the\nsubsidiary entities described later." - }, - "IShoppingSeller": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation tmie of record", - "description": "Creation tmie of record.\n\nAnother words, the time when the seller has signed up." - } - }, - "required": [ - "id", - "created_at" - ], - "description": "Seller information.\n\n`IShoppingSeller` is an entity that embodies a person who registers\n{@link IShoppingSale sales} to operate selling activities, with\n{@link IShoppingMember membership} joining.\n\nFor reference, unlike {@link IShoppingCustomer customers} which can\nparticipate even without membership joining, seller must join membership\nto operate sales. Also, seller must do the\n{@link IShoppingCitizen real-name and mobile authentication}, too." - }, - "IShoppingAdministrator": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record.\n\nAnother words, the time when the administrator has signed up." - } - }, - "required": [ - "id", - "created_at" - ], - "description": "Administrator account.\n\n`IShoppingAdministrator` is an entity that embodies a person who manages\nthe shopping mall system, with {@link IShoppingMember membership} joining.\n\nFor reference, unlike {@link IShoppingCustomer customers} which can participate\neven without membership joining, administrator must join membership to operate\nmanagements. Also, administrator must perform the\n{@link IShoppingCitizen real-name and mobile authentication}, too." - }, - "IShoppingCouponInventory": { - "type": "object", - "properties": { - "volume": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "integer" - } - ], - "title": "Remaining volume for everyone", - "description": "Remaining volume for everyone.\n\nIf there is a limit to the quantity issued, it becomes impossible to\nissue tickets exceeding this value.\n\nIn other words, the concept of N coupons being issued on a first-come,\nfirst-served basis is created." - }, - "volume_per_citizen": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "integer" - } - ], - "title": "Remaining volume per citizen", - "description": "Remaining volume per citizen.\n\nAs a limit to the total amount of issuance per person, it is common to\nassign 1 to limit duplicate issuance to the same citizen, or to use the\n`nul`` value to set no limit.\n\nOf course, by assigning a value of N, the total amount issued to the\nsame citizen can be limited." - } - }, - "required": [ - "volume", - "volume_per_citizen" - ], - "description": "Inventory information of the coupon.\n\nIf a {@link IShoppingCoupon coupon} has been designed with limited\ninventory, this `IShoppingCouponInventory` structure represents the\nremaining inventory information." - }, - "IShoppingCouponCriteria": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingCouponChannelCriteria" - }, - { - "$ref": "#/components/schemas/IShoppingCouponSectionCriteria" - }, - { - "$ref": "#/components/schemas/IShoppingCouponSellerCriteria" - }, - { - "$ref": "#/components/schemas/IShoppingCouponSaleCriteria" - }, - { - "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria" - } - ], - "description": "Union type of the criteria.\n\n`IShoppingCouponCriteria` is an union typed structure that embodies the\nconditions for applying a {@link IShoppingCoupon discount coupon}. All\nof individual entities are imposing constraints on the reference unit of\na discount coupon were created by inheritig\n{@link IShoppingCouponCriteriaBase} type.\n\nAlso, individual entities can be specified by using the if condition on\nthe {@link type} property. For example, if the {@link type} value is\n`section`, {@link IShoppingCouponSectionCriteria} type would be specified,\nso that you can access to the target\n{@link IShoppingCouponSectionCriteria.section} directly. For reference,\nthis concept is called a descriminated union in TypeScript.\n\n```typescript\nconst union: IShoppingCouponCriteria;\nif (union.type === \"section\")\n union.section; // IShoppingCouponSectionCriteria.section\n```\n\nIn addition, constraints on reference units can be specified through the\n{@link direction} property to proceed as an inclusion condition or,\nconversely, as an exclusion condition. If the direction value is \"include\",\nthe coupon is applicable only to the reference object. Conversely, if the\ndirection value is \"exclude\", it is a coupon that cannot be applied to the\nreference object." - }, - "IShoppingCouponChannelCriteria": { - "type": "object", - "properties": { - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponChannelCriteria.IChannelTo" - }, - "minItems": 1, - "title": "List of target channels and categories", - "description": "List of target channels and categories." - }, - "type": { - "const": "channel", - "title": "Descrimanator type", - "description": "Descrimanator type." - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ], - "title": "Direction of the criteria", - "description": "Direction of the criteria." - } - }, - "required": [ - "channels", - "type", - "direction" - ], - "description": "Conditions for channels of discount coupons.\n\n`ishoppingcouponchannelcriteria` is a subtype entity of\n{@link IShoppingCouponCriteriaBase} and is used when setting conditions on\na specific {@link IShoppingChannel channel} or\n{@link IShoppingChannelCategory category} of that channel.\n\nIf the {@link direction} value is \"include\", the coupon can only be used\nfor the target channels (or categories). Conversely, if it is \"exclude\",\nit is a coupon that cannot be used." - }, - "IShoppingCouponChannelCriteria.IChannelTo": { - "type": "object", - "properties": { - "channel": { - "$ref": "#/components/schemas/IShoppingChannel", - "title": "Target channel", - "description": "Target channel." - }, - "categories": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - }, - "minItems": 1 - } - ], - "title": "List of target categories", - "description": "List of target categories." - } - }, - "required": [ - "channel", - "categories" - ] - }, - "IShoppingChannelCategory.IInvert": { - "type": "object", - "properties": { - "parent": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - } - ], - "title": "Parent category info with recursive structure", - "description": "Parent category info with recursive structure.\n\nIf no parent exists, then be `null`." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "parent_id": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ], - "title": "Parent category's ID", - "description": "Parent category's ID." - }, - "name": { - "type": "string", - "title": "Representative name of the category", - "description": "Representative name of the category.\n\nThe name must be unique within the parent category. If no parent exists,\nthen the name must be unique within the channel between no parent\ncategories." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - } - }, - "required": [ - "parent", - "id", - "parent_id", - "name", - "created_at" - ], - "description": "Invert category information with parent category." - }, - "IShoppingCouponSectionCriteria": { - "type": "object", - "properties": { - "sections": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSection" - }, - "minItems": 1, - "title": "Target sections to include or exclude", - "description": "Target sections to include or exclude." - }, - "type": { - "const": "section", - "title": "Descrimanator type", - "description": "Descrimanator type." - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ], - "title": "Direction of the criteria", - "description": "Direction of the criteria." - } - }, - "required": [ - "sections", - "type", - "direction" - ], - "description": "Conditions for sections of discount coupons.\n\n`IShoppingCouponSectionCriteria` is a subtype entity of\n{@link IShoppingCouponCriteriaBase} and is used when setting conditions\nfor a specific {@link IShoppingSection section}.\n\nIf the {@link direction} value is \"include\", the coupon can only be used\nfor the target {@link sections}. Conversely, if it is \"exclude\", the\ncoupon cannot be used." - }, - "IShoppingSection": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "code": { - "type": "string", - "title": "Identifier code", - "description": "Identifier code." - }, - "name": { - "type": "string", - "title": "Representative name of the section", - "description": "Representative name of the section." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - } - }, - "required": [ - "id", - "code", - "name", - "created_at" - ], - "description": "Section information.\n\n`IShoppingSection` is a concept that refers to the spatial information of\nthe market.\n\nIf we compare the section mentioned here to the offline market, it means a\nspatially separated area within the store, such as the \"fruit corner\" or\n\"butcher corner\". Therefore, in the {@link IShoppingSale sale} entity, it is\nnot possible to classify multiple sections simultaneously, but only one section\ncan be classified.\n\nBy the way, if your shopping mall system requires only one section, then just\nuse only one. This concept is designed to be expandable in the future." - }, - "IShoppingCouponSellerCriteria": { - "type": "object", - "properties": { - "sellers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSeller" - }, - "minItems": 1, - "title": "Target sellers to include or exclude", - "description": "Target sellers to include or exclude." - }, - "type": { - "const": "seller", - "title": "Descrimanator type", - "description": "Descrimanator type." - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ], - "title": "Direction of the criteria", - "description": "Direction of the criteria." - } - }, - "required": [ - "sellers", - "type", - "direction" - ], - "description": "Conditions for sellers of discount coupons.\n\n`IShoppingCouponSellerCriteria` is a subtype entity of\n{@link IShoppingCouponCriteriaBase} and is used when setting conditions\nfor a specific {@link IShoppingSeller seller}.\n\nIf the {@link direction} value is \"include\", the coupon can only be used\nfor the target {@link sellers}. Conversely, if it is \"exclude\", the\ncoupon cannot be used." - }, - "IShoppingCouponSaleCriteria": { - "type": "object", - "properties": { - "sales": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSale.ISummary" - }, - "minItems": 1, - "title": "Target sales to include or exclude", - "description": "Target sales to include or exclude." - }, - "type": { - "const": "sale", - "title": "Descrimanator type", - "description": "Descrimanator type." - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ], - "title": "Direction of the criteria", - "description": "Direction of the criteria." - } - }, - "required": [ - "sales", - "type", - "direction" - ], - "description": "Conditions for sales of discount coupons.\n\n`IShoppingCouponSaleCriteria` is a subtype entity of\n{@link IShoppingCouponCriteriaBase} and is used when setting conditions\nfor a specific {@link IShoppingSale sale}.\n\nIf the {@link direction} value is \"include\", the coupon can only be used\nfor the target {@link sales}. Conversely, if it is \"exclude\", the\ncoupon cannot be used." - }, - "IShoppingSale.ISummary": { - "type": "object", - "properties": { - "section": { - "$ref": "#/components/schemas/IShoppingSection", - "title": "Belonged section", - "description": "Belonged section." - }, - "seller": { - "$ref": "#/components/schemas/IShoppingSeller.IInvert", - "title": "Seller who has registered the sale", - "description": "Seller who has registered the sale." - }, - "price_range": { - "$ref": "#/components/schemas/IShoppingSalePriceRange", - "title": "Price range of the unit", - "description": "Price range of the unit." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Sale", - "description": "Primary Key of Sale." - }, - "snapshot_id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Snapshot", - "description": "Primary Key of Snapshot." - }, - "latest": { - "type": "boolean", - "title": "Whether the snapshot is the latest one or not", - "description": "Whether the snapshot is the latest one or not." - }, - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent.IInvert", - "title": "Description and image content describing the sale", - "description": "Description and image content describing the sale." - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel" - }, - "minItems": 1, - "title": "List of channels and categories", - "description": "List of channels and categories.\n\nWhich channels and categories the sale is registered to." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of search tags", - "description": "List of search tags." - }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit.ISummary" - }, - "minItems": 1, - "title": "List of units", - "description": "List of units.\n\nRecords about individual product composition informations that are sold\nin the sale. Each {@link IShoppingSaleUnit unit} record has configurable\n{@link IShoppingSaleUnitOption options},\n{@link IShoppingSaleUnitOptionCandidate candidate} values for each\noption, and {@link IShoppingSaleUnitStock final stocks} determined by\nselecting every candidate values of each option." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record.\n\nNote that, this property is different with {@link opened_at},\nwhich means the timepoint of the sale is opened." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Last updated time of the record", - "description": "Last updated time of the record.\n\nIn another words, creation time of the last snapshot." - }, - "paused_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Paused time of the sale", - "description": "Paused time of the sale.\n\nThe sale is paused by the seller, for some reason.\n\n{@link IShoppingCustomer Customers} can still see the sale on the\nboth list and detail pages, but the sale has a warning label\n\"The sale is paused by the seller\"." - }, - "suspended_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Suspended time of the sale", - "description": "Suspended time of the sale.\n\nThe sale is suspended by the seller, for some reason.\n\n{@link IShoppingCustomer Customers} cannot see the sale on the\nboth list and detail pages. It is almost same with soft delettion,\nbut there's a little bit difference that the owner\n{@link IShoppingSeller seller} can still see the sale and resume it.\n\nOf course, the {@link IShoppingCustomer customers} who have\nalready purchased the sale can still see the sale on the\n{@link IShoppingOrder order} page." - }, - "opened_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Opening time of the sale", - "description": "Opening time of the sale." - }, - "closed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Closing time of the sale", - "description": "Closing time of the sale.\n\nIf this value is `null`, the sale be continued forever." - } - }, - "required": [ - "section", - "seller", - "price_range", - "id", - "snapshot_id", - "latest", - "content", - "channels", - "tags", - "units", - "created_at", - "updated_at", - "paused_at", - "suspended_at", - "opened_at", - "closed_at" - ], - "description": "Summarized information of sale.\n\nThis summarized information being used for pagination." - }, - "IShoppingSeller.IInvert": { - "type": "object", - "properties": { - "type": { - "const": "seller", - "title": "Discriminant for the type of customer", - "description": "Discriminant for the type of customer." - }, - "member": { - "$ref": "#/components/schemas/IShoppingMember.IInvert", - "title": "Membership joining information", - "description": "Membership joining information." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer.IInvert", - "title": "Customer, the connection information", - "description": "Customer, the connection information." - }, - "citizen": { - "$ref": "#/components/schemas/IShoppingCitizen", - "title": "Real-name and mobile number authentication information", - "description": "Real-name and mobile number authentication information." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation tmie of record", - "description": "Creation tmie of record.\n\nAnother words, the time when the seller has signed up." - } - }, - "required": [ - "type", - "member", - "customer", - "citizen", - "id", - "created_at" - ], - "description": "Invert information starting from seller info.\n\nInstead of accessing to the seller information from the\n{@link IShoppingCustomer.member} -> {@link IShoppingMember.seller},\n`IShoppingSeller.IInvert` starts from the seller information\nand access to the customer, member and {@link IShoppingCitizen citizen}\ninformations inversely." - }, - "IShoppingSalePriceRange": { - "type": "object", - "properties": { - "lowest": { - "$ref": "#/components/schemas/IShoppingPrice" - }, - "highest": { - "$ref": "#/components/schemas/IShoppingPrice" - } - }, - "required": [ - "lowest", - "highest" - ] - }, - "IShoppingPrice": { - "type": "object", - "properties": { - "nominal": { - "type": "number", - "minimum": 0, - "title": "Nominal price", - "description": "Nominal price.\n\nThis is not {@link real real price} to pay, but just a nominal price to show.\nIf this value is greater than the {@link real real price}, it would be shown\nlike {@link IShoppingSeller seller} is giving a discount." - }, - "real": { - "type": "number", - "minimum": 0, - "title": "Real price to pay", - "description": "Real price to pay." - } - }, - "required": [ - "nominal", - "real" - ], - "description": "Shopping price interface." - }, - "IShoppingSaleContent.IInvert": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "title": { - "type": "string" - }, - "thumbnails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile" - } - } - }, - "required": [ - "id", - "title", - "thumbnails" - ] - }, - "IAttachmentFile": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of attachment file", - "description": "Creation time of attachment file." - }, - "name": { - "type": "string", - "maxLength": 255, - "title": "File name, except extension", - "description": "File name, except extension.\n\nIf there's file `.gitignore`, then its name is an empty string." - }, - "extension": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "minLength": 1, - "maxLength": 8 - } - ], - "title": "Extension", - "description": "Extension.\n\nPossible to omit like `README` case." - }, - "url": { - "type": "string", - "format": "uri", - "title": "URL path of the real file", - "description": "URL path of the real file." - } - }, - "required": [ - "id", - "created_at", - "name", - "extension", - "url" - ], - "description": "Attachment File.\n\nEvery attachment files that are managed in current system.\n\nFor reference, it is possible to omit one of file {@link name}\nor {@link extension} like `.gitignore` or `README` case, but not\npossible to omit both of them." - }, - "IShoppingSaleChannel": { - "type": "object", - "properties": { - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - }, - "title": "List of categories of the channel listing the sale", - "description": "List of categories of the channel listing the sale.\n\nIf empty, it means all categories of the channel is listing the sale." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - }, - "code": { - "type": "string", - "title": "Identifier code", - "description": "Identifier code." - }, - "name": { - "type": "string", - "title": "Name of the channel", - "description": "Name of the channel." - } - }, - "required": [ - "categories", - "id", - "created_at", - "code", - "name" - ], - "description": "Target channel (and categories) of sale to sell.\n\n`IShoppingSaleChannel` is an entity that expresses through which\n{@link IShoppingChannel channel} a listing {@link IShoppingSale} is sold.\n\nAlso, if {@link IShoppingChannelCategory categories} are specified, it also\nmeans that the sale be sold. Otherwise, none of the categories of the channel\nbeing specified, it means that every categories of the channel is listing the\ntarget sale." - }, - "IShoppingSaleUnit.ISummary": { - "type": "object", - "properties": { - "price_range": { - "$ref": "#/components/schemas/IShoppingSalePriceRange" - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "name": { - "type": "string", - "title": "Representative name of the unit", - "description": "Representative name of the unit." - }, - "primary": { - "type": "boolean", - "title": "Whether the unit is primary or not", - "description": "Whether the unit is primary or not.\n\nJust a labeling value." - }, - "required": { - "type": "boolean", - "title": "Whether the unit is required or not", - "description": "Whether the unit is required or not.\n\nWhen the unit is required, the customer must select the unit. If do not\nselect, customer can't buy it.\n\nFor example, if there's a sale \"Macbook Set\" and one of the unit is the\n\"Main Body\", is it possible to buy the \"Macbook Set\" without the\n\"Main Body\" unit? This property is for that case." - } - }, - "required": [ - "price_range", - "id", - "name", - "primary", - "required" - ] - }, - "IShoppingCouponFunnelCriteria": { - "type": "object", - "properties": { - "funnels": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria.IValueFunnel" - }, - { - "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria.IVariableFunnel" - } - ] - }, - "minItems": 1, - "title": "List of target funnels", - "description": "List of target funnels." - }, - "type": { - "const": "funnel", - "title": "Descrimanator type", - "description": "Descrimanator type." - }, - "direction": { - "oneOf": [ - { - "const": "include" - }, - { - "const": "exclude" - } - ], - "title": "Direction of the criteria", - "description": "Direction of the criteria." - } - }, - "required": [ - "funnels", - "type", - "direction" - ], - "description": "Limit the funnel of discount coupons.\n\n`ishoppingcouponfunnelcriteria` is a subtype entity of\n{@link IShoppingCouponCriteria}, and is used when you want to issue or\nexclude discount coupons only to {@link IShoppingCustomer customers} who\ncame from a specific path.\n\nAnd funnel restrictions are possible in 3 ways: The first is\n{@link IShoppingCustomer.referrer}, and by parsing\n{@link IShoppingCustomer.href}, which records the customer's access\naddress, restrictions can be made in units of specific URLs or variables." - }, - "IShoppingCouponDiscount": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingCouponDiscount.IAmount" - }, - { - "$ref": "#/components/schemas/IShoppingCouponDiscount.IPercent" - } - ], - "description": "Discount information of the coupon.\n\n`IShoppingCouponDiscount` is a type representing the discount information\nof a {@link IShoppingCoupon}. Also, it is an union type that divided\nby the {@link unit} of the discount value, `amount` or `percent`." - }, - "IShoppingCoupon.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingCoupon.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-coupon.name" - }, - { - "const": "-coupon.unit" - }, - { - "const": "-coupon.value" - }, - { - "const": "-coupon.created_at" - }, - { - "const": "-coupon.opened_at" - }, - { - "const": "-coupon.closed_at" - }, - { - "const": "+coupon.name" - }, - { - "const": "+coupon.unit" - }, - { - "const": "+coupon.value" - }, - { - "const": "+coupon.created_at" - }, - { - "const": "+coupon.opened_at" - }, - { - "const": "+coupon.closed_at" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingCoupon.IRequest.ISearch": { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - }, - "IPageIShoppingCoupon": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCoupon" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IPage.IPagination": { - "type": "object", - "properties": { - "current": { - "type": "integer", - "title": "Current page number", - "description": "Current page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - }, - "records": { - "type": "integer", - "title": "Total records in the database", - "description": "Total records in the database." - }, - "pages": { - "type": "integer", - "title": "Total pages", - "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." - } - }, - "required": [ - "current", - "limit", - "records", - "pages" - ], - "description": "Page information." - }, - "IShoppingDeposit.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingDeposit.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-deposit.source" - }, - { - "const": "-deposit.code" - }, - { - "const": "-deposit.direction" - }, - { - "const": "+deposit.source" - }, - { - "const": "+deposit.code" - }, - { - "const": "+deposit.direction" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingDeposit.IRequest.ISearch": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "code": { - "type": "string" - }, - "direction": { - "oneOf": [ - { - "const": -1 - }, - { - "const": 1 - } - ] - } - } - }, - "IPageIShoppingDeposit": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeposit" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingDeposit": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "code": { - "type": "string" - }, - "source": { - "type": "string" - }, - "direction": { - "$ref": "#/components/schemas/IShoppingDeposit.Direction" - } - }, - "required": [ - "id", - "created_at", - "code", - "source", - "direction" - ] - }, - "IShoppingDeposit.Direction": { - "oneOf": [ - { - "const": 1 - }, - { - "const": -1 - } - ] - }, - "IShoppingDeposit.ICreate": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "source": { - "type": "string" - }, - "direction": { - "oneOf": [ - { - "const": -1 - }, - { - "const": 1 - } - ] - } - }, - "required": [ - "code", - "source", - "direction" - ] - }, - "IShoppingMileage.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingMileage.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-mileage.source" - }, - { - "const": "-mileage.code" - }, - { - "const": "-mileage.direction" - }, - { - "const": "+mileage.source" - }, - { - "const": "+mileage.code" - }, - { - "const": "+mileage.direction" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingMileage.IRequest.ISearch": { - "type": "object", - "properties": { - "source": { - "type": "string" - }, - "code": { - "type": "string" - }, - "direction": { - "oneOf": [ - { - "const": -1 - }, - { - "const": 1 - } - ] - } - } - }, - "IPageIShoppingMileage": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingMileage" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingMileage": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "value": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "number" - } - ] - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "code": { - "type": "string" - }, - "source": { - "type": "string" - }, - "direction": { - "$ref": "#/components/schemas/IShoppingMileage.Direction" - } - }, - "required": [ - "id", - "value", - "created_at", - "code", - "source", - "direction" - ] - }, - "IShoppingMileage.Direction": { - "oneOf": [ - { - "const": 1 - }, - { - "const": -1 - } - ] - }, - "IShoppingMileage.ICreate": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "source": { - "type": "string" - }, - "direction": { - "oneOf": [ - { - "const": -1 - }, - { - "const": 1 - } - ] - }, - "value": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "number" - } - ] - } - }, - "required": [ - "code", - "source", - "direction", - "value" - ] - }, - "IShoppingMileageDonation.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingMileageDonation.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-donation.created_at" - }, - { - "const": "-donation.value" - }, - { - "const": "-donation.reason" - }, - { - "const": "+donation.created_at" - }, - { - "const": "+donation.value" - }, - { - "const": "+donation.reason" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingMileageDonation.IRequest.ISearch": { - "type": "object", - "properties": { - "citizen": { - "$ref": "#/components/schemas/IShoppingCitizen.IRequest.ISearch" - }, - "minimum": { - "type": "number", - "minimum": 0 - }, - "maximum": { - "type": "number", - "minimum": 0 - }, - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - } - } - }, - "IShoppingCitizen.IRequest.ISearch": { - "type": "object", - "properties": { - "mobile": { - "type": "string", - "pattern": "^[0-9]*$" - }, - "name": { - "type": "string" - } - } - }, - "IPageIShoppingMileageDonation": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingMileageDonation" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingMileageDonation": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "administrator": { - "$ref": "#/components/schemas/IShoppingAdministrator.IInvert" - }, - "citizen": { - "$ref": "#/components/schemas/IShoppingCitizen" - }, - "value": { - "type": "number" - }, - "reason": { - "type": "string" - }, - "created_at": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "id", - "administrator", - "citizen", - "value", - "reason", - "created_at" - ] - }, - "IShoppingMileageDonation.ICreate": { - "type": "object", - "properties": { - "citizen_id": { - "type": "string", - "format": "uuid" - }, - "value": { - "type": "number" - }, - "reason": { - "type": "string" - } - }, - "required": [ - "citizen_id", - "value", - "reason" - ] - }, - "IShoppingOrder.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingOrder.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-order.price" - }, - { - "const": "-order.quantity" - }, - { - "const": "-order.created_at" - }, - { - "const": "-order.publish.paid_at" - }, - { - "const": "+order.price" - }, - { - "const": "+order.quantity" - }, - { - "const": "+order.created_at" - }, - { - "const": "+order.publish.paid_at" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of orders with pagination and searching/sorting conditions." - }, - "IShoppingOrder.IRequest.ISearch": { - "type": "object", - "properties": { - "min_price": { - "type": "number" - }, - "max_price": { - "type": "number" - }, - "paid": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - } - ] - }, - "sale": { - "$ref": "#/components/schemas/IShoppingSale.IRequest.ISearch" - } - } - }, - "IShoppingSale.IRequest.ISearch": { - "type": "object", - "properties": { - "show_paused": { - "type": "boolean" - }, - "show_suspended": { - "oneOf": [ - { - "const": "only" - }, - { - "type": "boolean" - } - ] - }, - "title": { - "type": "string" - }, - "content": { - "type": "string" - }, - "title_or_content": { - "type": "string" - }, - "price": { - "$ref": "#/components/schemas/IShoppingPrice.ISearch" - }, - "review": { - "$ref": "#/components/schemas/IShoppingSaleReview.IInvertSearch" - }, - "section_codes": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel_codes": { - "type": "array", - "items": { - "type": "string" - } - }, - "channel_category_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "seller": { - "$ref": "#/components/schemas/IShoppingSeller.IRequest.ISearch" - } - } - }, - "IShoppingPrice.ISearch": { - "type": "object", - "properties": { - "minimum": { - "type": "number" - }, - "maximum": { - "type": "number" - } - } - }, - "IShoppingSaleReview.IInvertSearch": { - "type": "object", - "properties": { - "score": { - "$ref": "#/components/schemas/IShoppingSaleReview.IInvertSearch.IScoreRange" - }, - "count": { - "$ref": "#/components/schemas/IShoppingSaleReview.IInvertSearch.ICountRange" - } - } - }, - "IShoppingSaleReview.IInvertSearch.IScoreRange": { - "type": "object", - "properties": { - "minimum": { - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "maximum": { - "type": "number", - "minimum": 0, - "maximum": 100 - } - } - }, - "IShoppingSaleReview.IInvertSearch.ICountRange": { - "type": "object", - "properties": { - "minimum": { - "type": "integer" - }, - "maximum": { - "type": "integer" - } - } - }, - "IShoppingSeller.IRequest.ISearch": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "mobile": { - "type": "string", - "pattern": "^[0-9]*$" - }, - "name": { - "type": "string" - }, - "email": { - "type": "string", - "format": "email" - }, - "nickname": { - "type": "string" - } - } - }, - "IPageIShoppingOrder": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrder" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingOrder": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who've applied for the order", - "description": "Customer who've applied for the order." - }, - "goods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrderGood" - }, - "minItems": 1, - "title": "List of goods in the order", - "description": "List of goods in the order." - }, - "price": { - "$ref": "#/components/schemas/IShoppingOrderPrice", - "title": "Price information including discounts", - "description": "Price information including discounts.\n\nFor reference, this price value has multiplied by the {@link volume} value.\nTherefore, even if {@link volume} value is equal to the target\n{@link IShoppingCartCommodity.volume}, this price value can be different\nwith the {@link IShoppingCartCommodity.price} value." - }, - "publish": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingOrderPublish" - } - ], - "title": "Order completion and payment information", - "description": "Order completion and payment information." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - } - }, - "required": [ - "id", - "customer", - "goods", - "price", - "publish", - "created_at" - ], - "description": "Order application information.\n\n`IShoppingOrder` is an entity that embodies {@link IShoppingCustomer customer}'s\norder application information. However, please note that at this time, you are\nstill at the \"order application\" stage and not the \"order confirmation\" stage.\n\nAnd as soon as a customer applies for an order, all\n{@link IShoppingCartCommodity commodities} in the target shopping cart are\npromoted to {@link IShoppingOrderGood goods}, and those good records are created\nunder this `IShoppingOrder`.\n\nOf course, not all commodities in the target shopping cart become\n{@link IShoppingOrderGood}, but only those selected by the customer become the\n{@link IShoppingOrderGood}." - }, - "IShoppingCustomer": { - "type": "object", - "properties": { - "type": { - "const": "customer", - "title": "Discriminant for the type of customer", - "description": "Discriminant for the type of customer." - }, - "member": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingMember" - } - ], - "title": "Membership information", - "description": "Membership information.\n\nIf the customer has joined as a member." - }, - "citizen": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingCitizen" - } - ], - "title": "Citizen information", - "description": "Citizen information.\n\nIf the customer has verified his real name and mobile number." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "channel": { - "$ref": "#/components/schemas/IShoppingChannel", - "title": "Belonged channel", - "description": "Belonged channel." - }, - "external_user": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingExternalUser" - } - ], - "title": "External user information", - "description": "External user information.\n\nWhen the customer has come frome an external service." - }, - "href": { - "type": "string", - "format": "uri", - "title": "Connection address", - "description": "Connection address.\n\nSame with {@link window.location.href} of client." - }, - "referrer": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uri" - } - ], - "title": "Referrer address", - "description": "Referrer address.\n\nSame with {@link window.document.referrer} of client." - }, - "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ], - "title": "Connection IP Address", - "description": "Connection IP Address." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the connection record", - "description": "Creation time of the connection record." - } - }, - "required": [ - "type", - "member", - "citizen", - "id", - "channel", - "external_user", - "href", - "referrer", - "ip", - "created_at" - ], - "description": "Customer information, but not a person but a connection basis.\n\n`IShoppingCustomer` is an entity that literally embodies the information of\nthose who participated in the market as customers. By the way, the\n`IShoppingCustomer` does not mean a person, but a connection basis. Therefore,\neven if the same person connects to the shopping mall multiple, multiple\nrecords are created in `IShoppingCustomer`.\n\nThe first purpose of this is to track the customer's inflow path in detail,\nand it is for cases where the same person enters as a non-member,\n{@link IShoppingCartCommodity puts items in the shopping cart} in advance,\nand only authenticates their {@link IShoppingCitizen real name} or\nregisters/logs in at the moment of {@link IShoppingOrderPublish payment}.\nIt is the second. Lastly, it is to accurately track the activities that\na person performs at the shopping mall in various ways like below.\n\n- Same person comes from an {@link IShoppingExternalUser external service}\n- Same person creates multiple accounts\n- Same person makes a {@link IShoppingOrderPublish purchase} as a non-member with only {@link IShoppingCitizen real name authentication}\n- Same person acts both {@link IShoppingSeller seller} and {@link IShoppingAdministrator admin} at the same time\n\nTherefore, `IShoppingCustomer` can have multiple records with the same\n{@link IShoppingCitizen}, {@link IShoppingMember}, and\n{@link IShoppingExternalUser}. Additionally, if a customer signs up for\nmembership after verifying their real name or signs up for our service after\nbeing a user of an external service, all related records are changed at once.\nTherefore, identification and tracking of customers can be done very\nsystematically." - }, - "IShoppingMember": { - "type": "object", - "properties": { - "citizen": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingCitizen" - } - ], - "title": "Citizen information", - "description": "Citizen information.\n\nOnly when has verified as a citizen, with mobile number and real name.\n\nFor reference, if the member has signed up as a seller or administrator,\nthis citizen information must be." - }, - "seller": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSeller" - } - ], - "title": "Seller information", - "description": "Seller information.\n\nIf the member also signed up as a seller." - }, - "administrator": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingAdministrator" - } - ], - "title": "Administrator information", - "description": "Administrator information.\n\nIf the member also signed up as an administrator." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "nickname": { - "type": "string", - "title": "Nickname that uniquely identifies the member", - "description": "Nickname that uniquely identifies the member." - }, - "emails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingMemberEmail" - }, - "title": "List of emails", - "description": "List of emails." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record.\n\nAnother words, the time when the member has signed up." - } - }, - "required": [ - "citizen", - "seller", - "administrator", - "id", - "nickname", - "emails", - "created_at" - ], - "description": "Member Account.\n\n`IShoppingMember` is an entity that symbolizes the case when a\n{@link IShoppingCustomer} signs up as a member of this shopping mall\nsystem.\n\nIf a `IShoppingMember` has seller or administrator property. it means that\nthe {@link IShoppingCustomer} has acting as a {@link IShoppingSeller seller}\nor {@link IShoppingAdministrator administrator} at the same time." - }, - "IShoppingOrderGood": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "commodity": { - "$ref": "#/components/schemas/IShoppingCartCommodity", - "title": "Commodity that is the basis of the good", - "description": "Commodity that is the basis of the good." - }, - "volume": { - "type": "integer", - "title": "Volume of the good", - "description": "Volume of the good.\n\nThe value multiplied to {@link IShoppingCartCommodityStock.quantity}.\nIt's purpose is exactly same with {@link IShoppingCartCommodity.volume},\nbut rewritten because the {@link IShoppingCartCommodity} records are reusable\nuntil payment." - }, - "price": { - "$ref": "#/components/schemas/IShoppingOrderPrice.ISummary", - "title": "Price information including discounts and multipled volume", - "description": "Price information including discounts and multipled volume." - }, - "state": { - "oneOf": [ - { - "type": "null" - }, - { - "const": "none" - }, - { - "const": "underway" - }, - { - "const": "preparing" - }, - { - "const": "manufacturing" - }, - { - "const": "shipping" - }, - { - "const": "delivering" - }, - { - "const": "arrived" - } - ], - "title": "State of delivery about the good", - "description": "State of delivery about the good." - }, - "confirmed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Confirmation time of order good", - "description": "Confirmation time of order good.\n\nWhen be confirmed, customer can't request refund or exchange.\n\nThe confirmation be accomplished by following cases.\n\n- Customer does it directly.\n- 14 days after the delivery." - } - }, - "required": [ - "id", - "commodity", - "volume", - "price", - "state", - "confirmed_at" - ], - "description": "Information about the individual goods that make up your order.\n\n`IShoppingOrderGood` is an entity that represents each good ordered by a\n{@link IShoppingCustomer customer}, and the record is created in the process\nof upgrading the product {@link IShoppingCartCommodity commodity} in the\nshopping cart to a good due to the customer's {@link IShoppingOrder order}\nrequest.\n\nAnd `IShoppingOrderGood`, like {@link IShoppingCartCommodity}, is a concept\nthat corresponds to the listing {@link IShoppingSaleSnapshot sale snapshot}.\n\nFor reference, `IShoppingOrderGood` also contains {@link volume} information\nseparately from the belonging {@link IShoppingCartCommodity.volume}. This is\nbecause there are some cases where you put 3 books in your shopping cart and\nthen change them to 4 during the actual order application process. This is to\nincrease the reusability of the shopping cart by changing the volume attribute\nof the current entity rather than directly changing the commodity information.\n\nIn addition, `IShoppingOrderGood` becomes the most basic unit for the post-order\nprocess, that is, after service (A/S). For example, after receiving a\ncustomer's product, confirming the order is recorded in the {@link confirmed_at}\nattribute. Additionally, `IShoppingOrderGood` is the unit in which customers\nissues or request exchanges or refunds for ordered products." - }, - "IShoppingCartCommodity": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "sale": { - "$ref": "#/components/schemas/IShoppingSaleSnapshot.IInvert", - "title": "Invert information of the sale (snapshot), in the perspective of commodity", - "description": "Invert information of the sale (snapshot), in the perspective of commodity." - }, - "orderable": { - "type": "boolean", - "title": "Whether current commodity is orderable or not", - "description": "Whether current commodity is orderable or not.\n\nIf this attribute is `false`, then the commodity is not orderable, because\nit has already been ordered." - }, - "pseudo": { - "type": "boolean", - "title": "Whether current commodity is pseudo or not", - "description": "Whether current commodity is pseudo or not.\n\nWhen this attribute is `true`, then the commodity is not the real one,\nbut just fake information only for calculating the discount effect by\n{@link IShoppingCoupon coupons}." - }, - "volume": { - "type": "integer", - "minimum": 1, - "title": "Volume of the commodity to purchase", - "description": "Volume of the commodity to purchase.\n\nA value indicating how many sets would be multiplied to the children\n{@link IShoppingSaleUnitStock.IInvert.quantity} values." - }, - "price": { - "$ref": "#/components/schemas/IShoppingPrice", - "title": "Price of the commodity", - "description": "Price of the commodity.\n\nFor reference, this price value has not been multiplied by the\n{@link volume} value. It just sumed up the prices of the children\n{@link IShoppingSaleUnitStock.IInvert.price} values." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - } - }, - "required": [ - "id", - "sale", - "orderable", - "pseudo", - "volume", - "price", - "created_at" - ], - "description": "Item in a shopping cart.\n\n`IShoppingCartCommodity` is an entity that represents a\n{@link IShoppingSaleSnapshot snapshot} of the items that\n{@link IShoppingCustomer customer} has placed into his shopping cart with a\n{@link IShoppingOrder purchase} in mind. And if the customer continues this\ninto an actual order in the future, `IShoppingCartCommodity` be changed to\n{@link IShoppingOrderGood}.\n\nAnd while adding a sale snapshot to the shopping cart, the customer inevitably\nselects specific {@link IShoppingSaleUnit units} and\n{@link IShoppingSaleUnitStock final stocks} within the listing snapshot.\nInformation about these units and stocks is recorded in the subsidiary entity\n{@link IShoppingCartCommodityStock}. Also, there is an attribute {@link volume}\nthat indicates how many sets of snapshots of the target commodity will be\npurchased. This \"volume\" is a value that will be multiplied by\n{@link IShoppingSaleUnitStock.IInvert.quantity}, the quantity for each\ncomponent." - }, - "IShoppingSaleSnapshot.IInvert": { - "type": "object", - "properties": { - "section": { - "$ref": "#/components/schemas/IShoppingSection", - "title": "Belonged section's information", - "description": "Belonged section's information." - }, - "seller": { - "$ref": "#/components/schemas/IShoppingSeller.IInvert", - "title": "Seller who've registered the sale", - "description": "Seller who've registered the sale." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Sale", - "description": "Primary Key of Sale." - }, - "snapshot_id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Snapshot", - "description": "Primary Key of Snapshot." - }, - "latest": { - "type": "boolean", - "title": "Whether the snapshot is the latest one or not", - "description": "Whether the snapshot is the latest one or not." - }, - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent.IInvert", - "title": "Description and image content describing the sale", - "description": "Description and image content describing the sale." - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel" - }, - "minItems": 1, - "title": "List of channels and categories", - "description": "List of channels and categories.\n\nWhich channels and categories the sale is registered to." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of search tags", - "description": "List of search tags." - }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit.IInvert" - }, - "minItems": 1, - "title": "List of units", - "description": "List of units.\n\nRecords about individual product composition informations that are sold\nin the sale. Each {@link IShoppingSaleUnit unit} record has configurable\n{@link IShoppingSaleUnitOption options},\n{@link IShoppingSaleUnitOptionCandidate candidate} values for each\noption, and {@link IShoppingSaleUnitStock final stocks} determined by\nselecting every candidate values of each option." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record.\n\nNote that, this property is different with {@link opened_at},\nwhich means the timepoint of the sale is opened." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Last updated time of the record", - "description": "Last updated time of the record.\n\nIn another words, creation time of the last snapshot." - }, - "paused_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Paused time of the sale", - "description": "Paused time of the sale.\n\nThe sale is paused by the seller, for some reason.\n\n{@link IShoppingCustomer Customers} can still see the sale on the\nboth list and detail pages, but the sale has a warning label\n\"The sale is paused by the seller\"." - }, - "suspended_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Suspended time of the sale", - "description": "Suspended time of the sale.\n\nThe sale is suspended by the seller, for some reason.\n\n{@link IShoppingCustomer Customers} cannot see the sale on the\nboth list and detail pages. It is almost same with soft delettion,\nbut there's a little bit difference that the owner\n{@link IShoppingSeller seller} can still see the sale and resume it.\n\nOf course, the {@link IShoppingCustomer customers} who have\nalready purchased the sale can still see the sale on the\n{@link IShoppingOrder order} page." - }, - "opened_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Opening time of the sale", - "description": "Opening time of the sale." - }, - "closed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Closing time of the sale", - "description": "Closing time of the sale.\n\nIf this value is `null`, the sale be continued forever." - } - }, - "required": [ - "section", - "seller", - "id", - "snapshot_id", - "latest", - "content", - "channels", - "tags", - "units", - "created_at", - "updated_at", - "paused_at", - "suspended_at", - "opened_at", - "closed_at" - ], - "description": "Invert information of the sale snapshot, in the perspective of commodity.\n\n`IShoppingSaleSnapshot.IInvert` is a structure used to represent a\nsnapshot in the perspective of a {@link IShoppingCommodity}, corresponding\nto an {@link IShoppingCartCommodityStock} entity.\n\nTherefore, `IShoppingSaleSnapshot.IInvert` does not contain every\n{@link IShoppingSaleUnit units} and {@link IShoppingSaleUnitStock stocks}\nof the snapshot records, but only some of the records which are put\ninto the {@link IShoppingCartCommodity shopping cart}." - }, - "IShoppingSaleUnit.IInvert": { - "type": "object", - "properties": { - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStock.IInvert" - }, - "minItems": 1, - "title": "List of final stocks", - "description": "List of final stocks." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "name": { - "type": "string", - "title": "Representative name of the unit", - "description": "Representative name of the unit." - }, - "primary": { - "type": "boolean", - "title": "Whether the unit is primary or not", - "description": "Whether the unit is primary or not.\n\nJust a labeling value." - }, - "required": { - "type": "boolean", - "title": "Whether the unit is required or not", - "description": "Whether the unit is required or not.\n\nWhen the unit is required, the customer must select the unit. If do not\nselect, customer can't buy it.\n\nFor example, if there's a sale \"Macbook Set\" and one of the unit is the\n\"Main Body\", is it possible to buy the \"Macbook Set\" without the\n\"Main Body\" unit? This property is for that case." - } - }, - "required": [ - "stocks", - "id", - "name", - "primary", - "required" - ] - }, - "IShoppingSaleUnitStock.IInvert": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "name": { - "type": "string", - "title": "Representative name of the stock", - "description": "Representative name of the stock." - }, - "price": { - "$ref": "#/components/schemas/IShoppingPrice", - "title": "Price of the stock", - "description": "Price of the stock." - }, - "quantity": { - "type": "integer", - "minimum": 1, - "title": "Quantity of the stock in the cart", - "description": "Quantity of the stock in the cart." - }, - "inventory": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockInventory", - "title": "Current inventory status of the stock", - "description": "Current inventory status of the stock." - }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockChoice.IInvert" - }, - "title": "List of choices", - "description": "List of choices.\n\nWhich values being written for each option." - } - }, - "required": [ - "id", - "name", - "price", - "quantity", - "inventory", - "choices" - ], - "description": "Invert information from the cart." - }, - "IShoppingSaleUnitStockInventory": { - "type": "object", - "properties": { - "income": { - "type": "integer", - "title": "Total income quantity", - "description": "Total income quantity." - }, - "outcome": { - "type": "integer", - "title": "Total outcome quantity", - "description": "Total outcome quantity." - } - }, - "required": [ - "income", - "outcome" - ], - "description": "Inventory information of a final stock." - }, - "IShoppingSaleUnitStockChoice.IInvert": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "option": { - "$ref": "#/components/schemas/IShoppingSaleUnitOption.IInvert", - "title": "Target option", - "description": "Target option." - }, - "candidate": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleUnitOptionCandidate" - } - ], - "title": "Selected candidate value", - "description": "Selected candidate value." - }, - "value": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ], - "title": "Written value", - "description": "Written value." - } - }, - "required": [ - "id", - "option", - "candidate", - "value" - ], - "description": "Invert information from the cart." - }, - "IShoppingSaleUnitOption.IInvert": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingSaleUnitSelectableOption.IInvert" - }, - { - "$ref": "#/components/schemas/IShoppingSaleUnitDescriptiveOption" - } - ], - "description": "Inversely referenced information of the option." - }, - "IShoppingSaleUnitSelectableOption.IInvert": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "type": { - "const": "select", - "title": "Discriminant for the type of selectable option", - "description": "Discriminant for the type of selectable option." - }, - "name": { - "type": "string", - "title": "Represents the name of the option", - "description": "Represents the name of the option." - }, - "variable": { - "type": "boolean", - "title": "Whether the option is variable or not", - "description": "Whether the option is variable or not.\n\nWhen type of current option is \"select\", this attribute means whether\nselecting different candidate value affects the final stock or not." - } - }, - "required": [ - "id", - "type", - "name", - "variable" - ] - }, - "IShoppingSaleUnitDescriptiveOption": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "type": { - "oneOf": [ - { - "const": "string" - }, - { - "const": "number" - }, - { - "const": "boolean" - } - ], - "title": "Type of descriptive option", - "description": "Type of descriptive option.\n\nWhich typed value should be written when purchasing." - }, - "name": { - "type": "string", - "title": "Readable name of the option", - "description": "Readable name of the option." - } - }, - "required": [ - "id", - "type", - "name" - ], - "description": "Descriptive option.\n\nWhen type of the option not `\"select\"`, it means the option is descriptive\nthat requiring {@link IShoppingCustomer customers} to write some value to\n{@link IShoppingOrder purchase}. Also, whatever customer writes about the\noption, it does not affect the {@link IShoppingSaleUnitStock final stock}.\n\nAnother words, the descriptive option is just for information transfer." - }, - "IShoppingSaleUnitOptionCandidate": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "name": { - "type": "string", - "title": "Represents the name of the candidate value", - "description": "Represents the name of the candidate value." - } - }, - "required": [ - "id", - "name" - ], - "description": "Selectable candidate values within an option.\n\n`IShoppingSaleUnitOptionCandidate` is an entity that represents individual\ncandidate values that can be selected from\n{@link IShoppingSaleUnitSelectableOption options of the \"select\" type}.\n\n- Example\n - RAM: 8GB, 16GB, 32GB\n - GPU: RTX 3060, RTX 4080, TESLA\n - License: Private, Commercial, Educatiion\n\nBy the way, if belonged option is not \"select\" type, this entity never\nbeing used." - }, - "IShoppingOrderPrice.ISummary": { - "type": "object", - "properties": { - "cash": { - "type": "number", - "minimum": 0, - "title": "Amount of the cash payment", - "description": "Amount of the cash payment." - }, - "deposit": { - "type": "number", - "minimum": 0, - "title": "Amount of the deposit payment", - "description": "Amount of the deposit payment." - }, - "mileage": { - "type": "number", - "minimum": 0, - "title": "Amount of the mileage payment", - "description": "Amount of the mileage payment." - }, - "ticket": { - "type": "number", - "minimum": 0, - "title": "Amount of the discount coupon ticket payment", - "description": "Amount of the discount coupon ticket payment." - }, - "nominal": { - "type": "number", - "minimum": 0, - "title": "Nominal price", - "description": "Nominal price.\n\nThis is not {@link real real price} to pay, but just a nominal price to show.\nIf this value is greater than the {@link real real price}, it would be shown\nlike {@link IShoppingSeller seller} is giving a discount." - }, - "real": { - "type": "number", - "minimum": 0, - "title": "Real price to pay", - "description": "Real price to pay." - } - }, - "required": [ - "cash", - "deposit", - "mileage", - "ticket", - "nominal", - "real" - ], - "description": "Summarized information of the order price." - }, - "IShoppingOrderPrice": { - "type": "object", - "properties": { - "ticket_payments": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponTicketPayment" - }, - "title": "List of discount coupon ticket payments", - "description": "List of discount coupon ticket payments." - }, - "cash": { - "type": "number", - "minimum": 0, - "title": "Amount of the cash payment", - "description": "Amount of the cash payment." - }, - "deposit": { - "type": "number", - "minimum": 0, - "title": "Amount of the deposit payment", - "description": "Amount of the deposit payment." - }, - "mileage": { - "type": "number", - "minimum": 0, - "title": "Amount of the mileage payment", - "description": "Amount of the mileage payment." - }, - "ticket": { - "type": "number", - "minimum": 0, - "title": "Amount of the discount coupon ticket payment", - "description": "Amount of the discount coupon ticket payment." - }, - "nominal": { - "type": "number", - "minimum": 0, - "title": "Nominal price", - "description": "Nominal price.\n\nThis is not {@link real real price} to pay, but just a nominal price to show.\nIf this value is greater than the {@link real real price}, it would be shown\nlike {@link IShoppingSeller seller} is giving a discount." - }, - "real": { - "type": "number", - "minimum": 0, - "title": "Real price to pay", - "description": "Real price to pay." - } - }, - "required": [ - "ticket_payments", - "cash", - "deposit", - "mileage", - "ticket", - "nominal", - "real" - ], - "description": "Price infromation of the order including discounts." - }, - "IShoppingCouponTicketPayment": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "ticket": { - "$ref": "#/components/schemas/IShoppingCouponTicket", - "title": "Target ticket", - "description": "Target ticket." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - } - }, - "required": [ - "id", - "ticket", - "created_at" - ], - "description": "Discount coupon ticket payment details.\n\n`IShoppingCouponTicketPayment` is an entity that embodies the payment\ninformation for the {@link IShoppingOrder order} of\n{@link IShoppingCouponTicket}, and is used when a consumer uses the\ndiscount coupon ticket he or she was issued to order and has the payment\namount deducted.\n\nAnd since {@link IShoppingOrder} itself is not an entity used in\nsituations where an order is completed, but rather an entity designed to\nexpress an order request, the creation of this\n`IShoppingCouponTicketPayment` record does not actually mean that the\nattached ticket disappears. Until the {@link IShoppingCustomer customer}\n{@link IShoppingOrderPublish.paid_at completes the payment} and confirms\nthe order, the ticket can be understood as a kind of deposit.\n\nAdditionally, this record can be deleted by the customer reversing the\npayment of the ticket, but it can also be deleted when the attribution\norder itself is cancelled." - }, - "IShoppingCouponTicket": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who've taken the coupon ticket", - "description": "Customer who've taken the coupon ticket." - }, - "coupon": { - "$ref": "#/components/schemas/IShoppingCoupon", - "title": "Target coupon", - "description": "Target coupon." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - }, - "expired_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Expiration time of the ticket", - "description": "Expiration time of the ticket." - } - }, - "required": [ - "id", - "customer", - "coupon", - "created_at", - "expired_at" - ], - "description": "Discount coupon ticket issuance details.\n\n`IShoppingCouponTicket` is an entity that symbolizes\n{@link IShoppingCoupon discount coupon} tickets issued by\n{@link IShoppingCustomer customers}.\n\nAnd if the target discount coupon specification itself has an expiration\ndate, the expiration date is recorded in expired_at and is automatically\ndiscarded after that expiration date. Of course, it doesn't matter if you\nuse the discount coupon for your order within the deadline." - }, - "IShoppingOrderPublish": { - "type": "object", - "properties": { - "deliveries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDelivery" - }, - "title": "List of deliveries", - "description": "List of deliveries.\n\nAn {@link IShoppingOrder order} can be delivered in multiple times.\nOf course, the opposite case is also possible, that a\n{@link IShoppingDelivery delivery} can be composed of multiple orders." - }, - "state": { - "$ref": "#/components/schemas/IShoppingDelivery.State", - "title": "State of the order, about the deliveries", - "description": "State of the order, about the deliveries." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - }, - "paid_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Time when the order was paid", - "description": "Time when the order was paid." - }, - "cancelled_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Time when the payment was cancelled", - "description": "Time when the payment was cancelled." - }, - "address": { - "$ref": "#/components/schemas/IShoppingAddress", - "title": "Address where the {@link IShoppingOrderGood goods} to be delivered", - "description": "Address where the {@link IShoppingOrderGood goods} to be delivered." - } - }, - "required": [ - "deliveries", - "state", - "id", - "created_at", - "paid_at", - "cancelled_at", - "address" - ], - "description": "Order completion and payment information.\n\n`IShoppingOrderPublish` is an entity that embodies the series of processes\nin which a {@link IShoppingCustomer customer} pays for his or her\n{@link IShoppingOrder order}, thereby completing the order. And only after\nthe order is {@link paid_at completed}, can the {@link IShoppingSeller seller}\nrecognize that the customer has purchased his product.\n\nBy the way, please note that just because the `IShoppingOrderPublish` record\nexists, it does not mean that the payment has been completed. Of course, with\n\"credit cards\" and \"Google Pay\", payment application and payment occur at the\nsame time. However, there are some cases where payment is made after the\npayment application, such as \"bank transfer\" or \"virtual account payment\".\nTherefore, to see the completion of payment, be sure to check the\n{@link paid_at} property.\n\nIn addition, even after payment has been made, there may be cases where it is\nsuddenly cancelled, so please be aware of this as well." - }, - "IShoppingDelivery": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "seller": { - "$ref": "#/components/schemas/IShoppingSeller", - "title": "Seller who've delivered the goods", - "description": "Seller who've delivered the goods." - }, - "journeys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney" - }, - "title": "List of journeys of the delivery", - "description": "List of journeys of the delivery." - }, - "pieces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryPiece" - }, - "minItems": 1, - "title": "List of pieces of the delivery", - "description": "List of pieces of the delivery." - }, - "shippers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryShipper" - }, - "title": "List of shippers of the delivery", - "description": "List of shippers of the delivery." - }, - "state": { - "$ref": "#/components/schemas/IShoppingDelivery.State", - "title": "State of the delivery", - "description": "State of the delivery." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - } - }, - "required": [ - "id", - "seller", - "journeys", - "pieces", - "shippers", - "state", - "created_at" - ], - "description": "Delivery information.\n\nWhen delivering {@link IShoppingOrderGood goods} to\n{@link IShoppingCustomer customer}, {@link IShoppingSeller seller} can deliver\nmultiple {@link IShoppingSaleUnitStock stocks}, goods at once. Also, it is\npossible to deliver a stock or good in multiple times due to physical restriction\nlike volume or weight problem.\n\nAs you can see from above, the relationship between delivery with\n{@link IShoppingOrder order} (or {@link IShoppingOrderGood good}) is not 1: 1 or\nN: 1, but M: N. Entity `IShoppingDelivery` has been designed to represent such\nrelationship, by referencing target stocks or goods through subsidiary entity\n{@link IShoppingDeliveryPiece}.\n\nAlso, delivery does not end with only one step. It has multiple processes like\nmanufacturing, planning, shipping and delivering. Those steps are represented by\nanother subsidiary entity {@link IShoppingDeliveryJourney}." - }, - "IShoppingDeliveryJourney": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - }, - "deleted_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Deletion time of the record", - "description": "Deletion time of the record." - }, - "type": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney.Type", - "title": "Type of journey", - "description": "Type of journey.\n\n- preparing\n- manufacturing\n- shipping\n- delivering" - }, - "title": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string" - } - ], - "title": "Title of journey", - "description": "Title of journey." - }, - "description": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string" - } - ], - "title": "Description of journey", - "description": "Description of journey." - }, - "started_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Start time of the journey", - "description": "Start time of the journey." - }, - "completed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Completion time of the journey", - "description": "Completion time of the journey." - } - }, - "required": [ - "id", - "created_at", - "deleted_at", - "type", - "title", - "description", - "started_at", - "completed_at" - ], - "description": "Journey of delivery.\n\n`IShoppingDeliveryJourney` is a subsidiary entity of {@link IShoppingDelivery},\ndescribing each journey of the delivery. For reference, the word journey\nmeans each step of the delivery process, such as preparing, shipping, and\ndelivering {@link IShoppingOrderGood goods} to the\n{@link IShoppingCustomer customer}." - }, - "IShoppingDeliveryJourney.Type": { - "oneOf": [ - { - "const": "preparing" - }, - { - "const": "manufacturing" - }, - { - "const": "shipping" - }, - { - "const": "delivering" - } - ] - }, - "IShoppingDeliveryPiece": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "publish_id": { - "type": "string", - "format": "uuid", - "title": "Target order's {@link IShoppingOrderPublish.id}", - "description": "Target order's {@link IShoppingOrderPublish.id}." - }, - "good_id": { - "type": "string", - "format": "uuid", - "title": "Target good's {@link IShoppingOrderGood.id}", - "description": "Target good's {@link IShoppingOrderGood.id}." - }, - "stock_id": { - "type": "string", - "format": "uuid", - "title": "Target stock's {@link IShoppingSaleUnitStock.id}", - "description": "Target stock's {@link IShoppingSaleUnitStock.id}." - }, - "quantity": { - "type": "number", - "minimum": 0, - "title": "Quantity of the stock", - "description": "Quantity of the stock.\n\nIt can be precision value to express splitted shipping." - } - }, - "required": [ - "id", - "publish_id", - "good_id", - "stock_id", - "quantity" - ], - "description": "Which stocks are delivered.\n\n`IShoppingDeliveryPiece` is a subsidiary entity of {@link IShoppingDelivery},\ndescribing how much quantity is delivered for each\n{@link IShoppingSaleUnitStock stock} in {@link IShoppingOrder}.\n\nFor reference, as an order can be delivered in multiple times due to volume\nor weight problem, it is possible to have multiple `IShoppingDeliveryPiece`\nrecords for a single stock." - }, - "IShoppingDeliveryShipper": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "company": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string" - } - ] - }, - "name": { - "type": "string" - }, - "mobile": { - "type": "string" - } - }, - "required": [ - "id", - "created_at", - "company", - "name", - "mobile" - ] - }, - "IShoppingDelivery.State": { - "oneOf": [ - { - "const": "none" - }, - { - "const": "underway" - }, - { - "const": "preparing" - }, - { - "const": "manufacturing" - }, - { - "const": "shipping" - }, - { - "const": "delivering" - }, - { - "const": "arrived" - } - ], - "description": "State of delivery\n\n- `none`: No delivery or journey record\n- `underway`: Some pieces are over preparing, but others are not\n- `preparing`: At least preparing\n- `manufacturing`: At least manufacturing\n- `shipping`: At least shipping\n- `delivering`: At least delivering\n- `arrived`: Every pieces are arrived" - }, - "IShoppingAddress": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - }, - "mobile": { - "type": "string", - "pattern": "^[0-9]*$", - "title": "Mobile number to contact", - "description": "Mobile number to contact." - }, - "name": { - "type": "string", - "title": "Representative name of the address", - "description": "Representative name of the address.\n\nSometimes be receiver's name, and sometimes be place name." - }, - "country": { - "type": "string", - "title": "Country name", - "description": "Country name." - }, - "province": { - "type": "string", - "title": "Province name", - "description": "Province name." - }, - "city": { - "type": "string", - "title": "City name", - "description": "City name." - }, - "department": { - "type": "string", - "title": "Department name", - "description": "Department name." - }, - "possession": { - "type": "string", - "title": "Detailed address containing street name, building number, and room number", - "description": "Detailed address containing street name, building number, and room number." - }, - "zip_code": { - "type": "string", - "title": "Zip code, or postal code", - "description": "Zip code, or postal code." - }, - "special_note": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string" - } - ], - "title": "Special description if required", - "description": "Special description if required." - } - }, - "required": [ - "id", - "created_at", - "mobile", - "name", - "country", - "province", - "city", - "department", - "possession", - "zip_code", - "special_note" - ], - "description": "The address information." - }, - "IShoppingSale.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingSale.IRequest.ISearch", - "title": "Search conditions", - "description": "Search conditions." - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-seller.created_at" - }, - { - "const": "-seller.goods.payments.real" - }, - { - "const": "-seller.goods.publish_count" - }, - { - "const": "-seller.reviews.average" - }, - { - "const": "-seller.reviews.count" - }, - { - "const": "-goods.publish_count" - }, - { - "const": "-goods.payments.real" - }, - { - "const": "-reviews.average" - }, - { - "const": "-reviews.count" - }, - { - "const": "-sale.created_at" - }, - { - "const": "-sale.updated_at" - }, - { - "const": "-sale.opened_at" - }, - { - "const": "-sale.closed_at" - }, - { - "const": "-sale.content.title" - }, - { - "const": "-sale.price_range.lowest.real" - }, - { - "const": "-sale.price_range.highest.real" - }, - { - "const": "+seller.created_at" - }, - { - "const": "+seller.goods.payments.real" - }, - { - "const": "+seller.goods.publish_count" - }, - { - "const": "+seller.reviews.average" - }, - { - "const": "+seller.reviews.count" - }, - { - "const": "+goods.publish_count" - }, - { - "const": "+goods.payments.real" - }, - { - "const": "+reviews.average" - }, - { - "const": "+reviews.count" - }, - { - "const": "+sale.created_at" - }, - { - "const": "+sale.updated_at" - }, - { - "const": "+sale.opened_at" - }, - { - "const": "+sale.closed_at" - }, - { - "const": "+sale.content.title" - }, - { - "const": "+sale.price_range.lowest.real" - }, - { - "const": "+sale.price_range.highest.real" - } - ] - }, - "title": "Sorting conditions", - "description": "Sorting conditions." - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of summarized sales with pagination and searching/sorting options." - }, - "IPageIShoppingSale.ISummary": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSale.ISummary" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSale": { - "type": "object", - "properties": { - "section": { - "$ref": "#/components/schemas/IShoppingSection", - "title": "Belonged section", - "description": "Belonged section." - }, - "seller": { - "$ref": "#/components/schemas/IShoppingSeller.IInvert", - "title": "Seller who has registered the sale", - "description": "Seller who has registered the sale." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Sale", - "description": "Primary Key of Sale." - }, - "snapshot_id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Snapshot", - "description": "Primary Key of Snapshot." - }, - "latest": { - "type": "boolean", - "title": "Whether the snapshot is the latest one or not", - "description": "Whether the snapshot is the latest one or not." - }, - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent", - "title": "Description and image content describing the sale", - "description": "Description and image content describing the sale." - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel" - }, - "minItems": 1, - "title": "List of channels and categories", - "description": "List of channels and categories.\n\nWhich channels and categories the sale is registered to." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of search tags", - "description": "List of search tags." - }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit" - }, - "minItems": 1, - "title": "List of units", - "description": "List of units.\n\nRecords about individual product composition informations that are sold\nin the sale. Each {@link IShoppingSaleUnit unit} record has configurable\n{@link IShoppingSaleUnitOption options},\n{@link IShoppingSaleUnitOptionCandidate candidate} values for each\noption, and {@link IShoppingSaleUnitStock final stocks} determined by\nselecting every candidate values of each option." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record.\n\nNote that, this property is different with {@link opened_at},\nwhich means the timepoint of the sale is opened." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Last updated time of the record", - "description": "Last updated time of the record.\n\nIn another words, creation time of the last snapshot." - }, - "paused_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Paused time of the sale", - "description": "Paused time of the sale.\n\nThe sale is paused by the seller, for some reason.\n\n{@link IShoppingCustomer Customers} can still see the sale on the\nboth list and detail pages, but the sale has a warning label\n\"The sale is paused by the seller\"." - }, - "suspended_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Suspended time of the sale", - "description": "Suspended time of the sale.\n\nThe sale is suspended by the seller, for some reason.\n\n{@link IShoppingCustomer Customers} cannot see the sale on the\nboth list and detail pages. It is almost same with soft delettion,\nbut there's a little bit difference that the owner\n{@link IShoppingSeller seller} can still see the sale and resume it.\n\nOf course, the {@link IShoppingCustomer customers} who have\nalready purchased the sale can still see the sale on the\n{@link IShoppingOrder order} page." - }, - "opened_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Opening time of the sale", - "description": "Opening time of the sale." - }, - "closed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Closing time of the sale", - "description": "Closing time of the sale.\n\nIf this value is `null`, the sale be continued forever." - } - }, - "required": [ - "section", - "seller", - "id", - "snapshot_id", - "latest", - "content", - "channels", - "tags", - "units", - "created_at", - "updated_at", - "paused_at", - "suspended_at", - "opened_at", - "closed_at" - ], - "description": "Seller sales products.\n\n`IShoppingSale` is an entity that embodies \"product sales\" (sales)\ninformation registered by the {@link ISoppingSeller seller}. And the main\ninformation of the sale is recorded in the sub {@link IShoppingSaleSnapshot},\nnot in the main `IShoppingSale`. When a seller changes a previously registered\nitem, the existing `IShoppingSale` record is not changed, but a new\n{@link IShoppingSaleSnapshot snapshot} record be created.\n\nThis is to preserve the {@link IShoppingCustomer customer}'s\n{@link IShoppingOrder purchase history} flawlessly after the customer\npurchases a specific item, even if the seller changes the components or\nprice of the item. It is also intended to support sellers in so-called A/B\ntesting, which involves changing components or prices and measuring the\nperformance in each case." - }, - "IShoppingSaleContent": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the content", - "description": "Title of the content." - }, - "format": { - "$ref": "#/components/schemas/IShoppingSaleContent.Type", - "title": "Format of the body content", - "description": "Format of the body content.\n\nSame meaning with file extension like `html`, `md`, and `txt`." - }, - "body": { - "type": "string", - "title": "The main body content", - "description": "The main body content." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile" - }, - "title": "List of attached files", - "description": "List of attached files." - }, - "thumbnails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile" - }, - "title": "List of thumbnails", - "description": "List of thumbnails." - } - }, - "required": [ - "id", - "title", - "format", - "body", - "files", - "thumbnails" - ], - "description": "Content information of sale snapshot.\n\n`IShoppingSaleContent` is an entity embodies the description contents\nof {@link IShoppingSale}." - }, - "IShoppingSaleContent.Type": { - "oneOf": [ - { - "const": "html" - }, - { - "const": "md" - }, - { - "const": "txt" - } - ] - }, - "IShoppingSaleUnit": { - "type": "object", - "properties": { - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitOption" - }, - "title": "List of options", - "description": "List of options." - }, - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStock" - }, - "minItems": 1, - "title": "List of final stocks", - "description": "List of final stocks." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "name": { - "type": "string", - "title": "Representative name of the unit", - "description": "Representative name of the unit." - }, - "primary": { - "type": "boolean", - "title": "Whether the unit is primary or not", - "description": "Whether the unit is primary or not.\n\nJust a labeling value." - }, - "required": { - "type": "boolean", - "title": "Whether the unit is required or not", - "description": "Whether the unit is required or not.\n\nWhen the unit is required, the customer must select the unit. If do not\nselect, customer can't buy it.\n\nFor example, if there's a sale \"Macbook Set\" and one of the unit is the\n\"Main Body\", is it possible to buy the \"Macbook Set\" without the\n\"Main Body\" unit? This property is for that case." - } - }, - "required": [ - "options", - "stocks", - "id", - "name", - "primary", - "required" - ], - "description": "Product composition information handled in the sale.\n\n`IShoppingSaleUnit` is an entity that embodies the \"individual product\"\ninformation handled in the {@link IShoppingSale sale}.\n\nFor reference, the reason why `IShoppingSaleUnit` is separated from\n{@link IShoppingSaleSnapshot} by an algebraic relationship of 1: N is because\nthere are some cases where multiple products are sold in one listing. This is\nthe case with so-called \"bundled products\".\n\n- Bundle from regular product (Mackbook Set)\n - Main Body\n - Keyboard\n - Mouse\n - Apple Care (Free A/S Voucher)\n\nAnd again, `IShoppingSaleUnit` does not in itself refer to the\n{@link IShoppingSaleUnitStock final stock} that the\n{@link IShoppingCustomer customer} will {@link IShoppingOrder purchase}.\nThe final stock can be found only after selecting all given\n{@link IShoppingSaleUnitOption options} and their\n{@link IShoppingSaleUnitOptionCandidate candidate values}.\n\nFor example, even if you buy a Macbook, the final stocks are determined only\nafter selecting all the options (CPU / RAM / SSD), etc." - }, - "IShoppingSaleUnitOption": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingSaleUnitDescriptiveOption" - }, - { - "$ref": "#/components/schemas/IShoppingSaleUnitSelectableOption" - } - ], - "description": "Individual option information on units for sale.\n\n`IShoppingSaleUnitOption` is a subsidiary entity of\n{@link IShoppingSaleUnit} that represents individual products in the\n{@link IShoppingSale sale}, and is an entity designed to represent individual\noption information for the unit.\n\nAlso, `IShoppingSaleUnitOption` is an union type of two entities,\n{@link IShoppingSaleUnitSelectableOption} and\n{@link IShoppingSaleUnitDescriptiveOption}. To specify the detailed type of\nthem, just use the `if` statement to the {@link type} property like below:\n\n```typescript\nif (option.type === \"select\")\n option.candidates; // IShoppingSaleUnitSelectableOption\n```\n\n- Examples of Options\n - selectable options\n - Computer: CPU, RAM, SSD, etc.\n - Clothes: size, color, style, etc.\n - descriptive options\n - Engrave\n - Simple question\n\nIf the type of option is a variable value in \"select\", the final stock that the\n{@link IShoppingCustomer customer} will purchase changes depending on the\nselection of the {@link IShoppingSaleUnitOptionCandidate candidate value}.\n\nConversely, if it is a type other than \"select\", or if the type is \"select\" but\nvariable is false, this is an option that has no meaning beyond simple information\ntransfer. Therefore, no matter what value the customer enters and chooses when\npurchasing it, the option in this case does not affect the\n{@link IShoppingSaleUnitStock final stock}." - }, - "IShoppingSaleUnitSelectableOption": { - "type": "object", - "properties": { - "candidates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitOptionCandidate" - }, - "minItems": 1, - "title": "List of candidate values", - "description": "List of candidate values." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "type": { - "const": "select", - "title": "Discriminant for the type of selectable option", - "description": "Discriminant for the type of selectable option." - }, - "name": { - "type": "string", - "title": "Represents the name of the option", - "description": "Represents the name of the option." - }, - "variable": { - "type": "boolean", - "title": "Whether the option is variable or not", - "description": "Whether the option is variable or not.\n\nWhen type of current option is \"select\", this attribute means whether\nselecting different candidate value affects the final stock or not." - } - }, - "required": [ - "candidates", - "id", - "type", - "name", - "variable" - ], - "description": "Individual option information on units for sale.\n\n`IShoppingSaleUnitSelectableOption` is a subsidiary entity of\n{@link IShoppingSaleUnit} that represents individual products in the\n{@link IShoppingSale sale}, and is an entity designed to represent individual\nselectable option information for the unit.\n\n- Examples of Options\n - selectable options\n - Computer: CPU, RAM, SSD, etc.\n - Clothes: size, color, style, etc.\n - descriptive options\n - Engrave\n - Simple question\n\nIf the {@link variable} property value is `true`, the final stock that the\n{@link IShoppingCustomer customer} will purchase changes depending on the\nselection of the {@link IShoppingSaleUnitOptionCandidate candidate value}.\n\nConversely, if it is a type other than \"select\", or if the {@link variable}\nproperty value is \"false\", , this is an option that has no meaning beyond\nsimple information transfer. Therefore, no matter what value the customer\nchooses when purchasing it, the option in this case does not affect the\n{@link IShoppingSaleUnitStock final stock}." - }, - "IShoppingSaleUnitStock": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "name": { - "type": "string", - "title": "Representative name of the stock", - "description": "Representative name of the stock." - }, - "price": { - "$ref": "#/components/schemas/IShoppingPrice", - "title": "Price of the stock", - "description": "Price of the stock." - }, - "inventory": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockInventory", - "title": "Current inventory status of the stock", - "description": "Current inventory status of the stock." - }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockChoice" - }, - "title": "List of choices", - "description": "List of choices.\n\nWhich candidate values being chosen for each option." - } - }, - "required": [ - "id", - "name", - "price", - "inventory", - "choices" - ], - "description": "Final component information on units for sale.\n\n`IShoppingSaleUnitStock` is a subsidiary entity of {@link IShoppingSaleUnit}\nthat represents a product catalog for sale, and is a kind of final stock that is\nconstructed by selecting all {@link IShoppingSaleUnitSelectableOption options}\n(variable \"select\" type) and their\n{@link IShoppingSaleUnitOptionCandidate candidate} values in the belonging unit.\nIt is the \"good\" itself that customers actually purchase.\n\n- Product Name) MacBook\n - Options\n - CPU: { i3, i5, i7, i9 }\n - RAM: { 8GB, 16GB, 32GB, 64GB, 96GB }\n - SSD: { 256GB, 512GB, 1TB }\n - Number of final stocks: 4 * 5 * 3 = 60\n\nFor reference, the total number of `IShoppingSaleUnitStock` records in an\nattribution unit can be obtained using Cartesian Product. In other words, the\nvalue obtained by multiplying all the candidate values that each\n(variable \"select\" type) option can have by the number of cases is the total\nnumber of final stocks in the unit.\n\nOf course, without a single variable \"select\" type option, the final stocks\ncount in the unit is only 1." - }, - "IShoppingSaleUnitStockChoice": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "option_id": { - "type": "string", - "format": "uuid", - "description": "Target option's {@link IShoppingSaleUnitOption.id}" - }, - "candidate_id": { - "type": "string", - "format": "uuid", - "description": "Target candidate's {@link IShoppingSaleUnitOptionCandidate.id}" - } - }, - "required": [ - "id", - "option_id", - "candidate_id" - ], - "description": "Selection information of final stock.\n\n`IShoppingSaleUnitStockChoice` is an entity that represents which\n{@link IShoppingSaleUnitSelectableOption option} of each variable \"select\"\ntype was selected for each {@link IShoppingSaleUnitStock stock} and which\n{@link IShoppingSaleUnitOptionCandidate candidate value} was selected within\nit.\n\nOf course, if the bound {@link IShoppingSaleUnit unit} does not have any\noptions, this entity can also be ignored." - }, - "IShoppingSaleInquiryComment.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-created_at" - }, - { - "const": "+created_at" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of the comments with pagination and searching/sorting options." - }, - "IShoppingSaleInquiryComment.IRequest.ISearch": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "nickname": { - "type": "string" - }, - "body": { - "type": "string" - } - } - }, - "IPageIShoppingSaleInquiryComment": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleInquiryComment" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSaleInquiryComment": { - "type": "object", - "properties": { - "writer": { - "$ref": "#/components/schemas/IShoppingActorEntity", - "title": "Writer of the comment", - "description": "Writer of the comment.\n\nBoth customer and seller can write comment on the sale inquiry.\n\nBy the way, no restriction on the customer, but seller must be the\nperson who've registered the sale." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "parent_id": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ], - "title": "Parent comment's ID", - "description": "Parent comment's ID." - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IBbsArticleComment.ISnapshot" - }, - "minItems": 1, - "title": "List of snapshot contents", - "description": "List of snapshot contents.\n\nIt is created for the first time when a comment being created, and is\naccumulated every time the comment is modified." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of comment", - "description": "Creation time of comment." - } - }, - "required": [ - "writer", - "id", - "parent_id", - "snapshots", - "created_at" - ], - "description": "A comment written on an inquiry article.\n\n`IShoppingSaleInquiryComment` is a subtype entity of {@link IBbsArticleComment},\nand is used when you want to communicate with multiple people about an\n{@link IShoppingSaleInquiry inquiry} written by a\n{@link IShoppingCustomer customer}.\n\nFor reference, only related parties can write comments for\n{@link IShoppingSeller sellers}, but there is no limit to\n{@link IShoppingCustomer customers}. In other words, anyone customer can\nfreely write a comment, even if they are not the person who wrote the inquiry." - }, - "IShoppingActorEntity": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingAdministrator.IInvert" - }, - { - "$ref": "#/components/schemas/IShoppingSeller.IInvert" - }, - { - "$ref": "#/components/schemas/IShoppingCustomer" - } - ] - }, - "IBbsArticleComment.ISnapshot": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of snapshot record", - "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or comment." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticleComment.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "body": { - "type": "string", - "title": "Content body of comment", - "description": "Content body of comment." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "id", - "created_at", - "format", - "body", - "files" - ], - "description": "Snapshot of comment.\n\n`IBbsArticleComment.ISnapshot` is a snapshot entity that contains\nthe contents of the comment.\n\nAs mentioned in {@link IBbsArticleComment}, designed to keep evidence\nand prevent fraud." - }, - "IBbsArticleComment.Format": { - "oneOf": [ - { - "const": "html" - }, - { - "const": "md" - }, - { - "const": "txt" - } - ] - }, - "IAttachmentFile.ICreate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "maxLength": 255, - "title": "File name, except extension", - "description": "File name, except extension.\n\nIf there's file `.gitignore`, then its name is an empty string." - }, - "extension": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "minLength": 1, - "maxLength": 8 - } - ], - "title": "Extension", - "description": "Extension.\n\nPossible to omit like `README` case." - }, - "url": { - "type": "string", - "format": "uri", - "title": "URL path of the real file", - "description": "URL path of the real file." - } - }, - "required": [ - "name", - "extension", - "url" - ] - }, - "IShoppingSaleInquiryComment.ICreate": { - "type": "object", - "properties": { - "format": { - "oneOf": [ - { - "const": "html" - }, - { - "const": "md" - }, - { - "const": "txt" - } - ], - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "body": { - "type": "string", - "title": "Content body of comment", - "description": "Content body of comment." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "format", - "body", - "files" - ], - "description": "Creation information of the comment." - }, - "IShoppingSaleInquiryComment.ISnapshot": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of snapshot record", - "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or comment." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticleComment.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "body": { - "type": "string", - "title": "Content body of comment", - "description": "Content body of comment." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "id", - "created_at", - "format", - "body", - "files" - ], - "description": "Snapshot content of the comment." - }, - "IShoppingSaleQuestion.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingSaleInquiry.IRequest.ISearch", - "title": "Search conditions", - "description": "Search conditions." - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-created_at" - }, - { - "const": "+created_at" - }, - { - "const": "-nickname" - }, - { - "const": "-answered_at" - }, - { - "const": "-title" - }, - { - "const": "-updated_at" - }, - { - "const": "+nickname" - }, - { - "const": "+answered_at" - }, - { - "const": "+title" - }, - { - "const": "+updated_at" - } - ] - }, - "title": "Sorting conditions", - "description": "Sorting conditions." - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of summarized informations with pagination searching/sorting options." - }, - "IShoppingSaleInquiry.IRequest.ISearch": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "nickname": { - "type": "string" - }, - "answered": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - } - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "title_or_body": { - "type": "string" - }, - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - } - } - }, - "IPageIShoppingSaleQuestion.ISummary": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.ISummary" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSaleQuestion.ISummary": { - "type": "object", - "properties": { - "secret": { - "type": "boolean", - "title": "Whether the question article is secret or not", - "description": "Whether the question article is secret or not.\n\nIf secret article, only the writer customer and related seller can see\nthe detailed content." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who wrote the inquiry", - "description": "Customer who wrote the inquiry." - }, - "answer": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer.ISummary" - } - ], - "title": "Formal answer for the inquiry by the seller", - "description": "Formal answer for the inquiry by the seller." - }, - "read_by_seller": { - "type": "boolean", - "title": "Whether the seller has viewed the inquiry or not", - "description": "Whether the seller has viewed the inquiry or not." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the last snapshot", - "description": "Title of the last snapshot." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Modification time of the article", - "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." - } - }, - "required": [ - "secret", - "customer", - "answer", - "read_by_seller", - "id", - "title", - "created_at", - "updated_at" - ], - "description": "Summarized information of the question." - }, - "IShoppingSaleInquiryAnswer.ISummary": { - "type": "object", - "properties": { - "seller": { - "$ref": "#/components/schemas/IShoppingSeller" - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the last snapshot", - "description": "Title of the last snapshot." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Modification time of the article", - "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." - } - }, - "required": [ - "seller", - "id", - "title", - "created_at", - "updated_at" - ] - }, - "IPageIShoppingSaleQuestion.IAbridge": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleQuestion.IAbridge" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSaleQuestion.IAbridge": { - "type": "object", - "properties": { - "secret": { - "type": "boolean", - "title": "Whether the question article is secret or not", - "description": "Whether the question article is secret or not.\n\nIf secret article, only the writer customer and related seller can see\nthe detailed content." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who wrote the inquiry", - "description": "Customer who wrote the inquiry." - }, - "answer": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer.IAbridge" - } - ], - "title": "Formal answer for the inquiry by the seller", - "description": "Formal answer for the inquiry by the seller." - }, - "read_by_seller": { - "type": "boolean", - "title": "Whether the seller has viewed the inquiry or not", - "description": "Whether the seller has viewed the inquiry or not." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the last snapshot", - "description": "Title of the last snapshot." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Modification time of the article", - "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticle.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "secret", - "customer", - "answer", - "read_by_seller", - "id", - "title", - "created_at", - "updated_at", - "format", - "body", - "files" - ], - "description": "Abridged information of the question." - }, - "IShoppingSaleInquiryAnswer.IAbridge": { - "type": "object", - "properties": { - "seller": { - "$ref": "#/components/schemas/IShoppingSeller" - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the last snapshot", - "description": "Title of the last snapshot." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Modification time of the article", - "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticle.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "seller", - "id", - "title", - "created_at", - "updated_at", - "format", - "body", - "files" - ] - }, - "IBbsArticle.Format": { - "oneOf": [ - { - "const": "html" - }, - { - "const": "md" - }, - { - "const": "txt" - } - ] - }, - "IShoppingSaleQuestion": { - "type": "object", - "properties": { - "secret": { - "type": "boolean", - "title": "Whether the question article is secret or not", - "description": "Whether the question article is secret or not.\n\nIf secret article, only the writer customer and related seller can see\nthe detailed content." - }, - "type": { - "const": "question", - "title": "Type of the derived inquiry", - "description": "Type of the derived inquiry.\n\n- `question`: {@link IShoppingSaleQuestion}\n- `review`: {@link IShoppingSaleReview}" - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who wrote the inquiry", - "description": "Customer who wrote the inquiry." - }, - "answer": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer" - } - ], - "title": "Formal answer for the inquiry by the seller", - "description": "Formal answer for the inquiry by the seller." - }, - "read_by_seller": { - "type": "boolean", - "title": "Whether the seller has viewed the inquiry or not", - "description": "Whether the seller has viewed the inquiry or not." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IBbsArticle.ISnapshot" - }, - "minItems": 1, - "title": "List of snapshot contents", - "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of article", - "description": "Creation time of article." - } - }, - "required": [ - "secret", - "type", - "customer", - "answer", - "read_by_seller", - "id", - "snapshots", - "created_at" - ], - "description": "Question about sale snapshot.\n\n`IShoppingSaleQuestion` is a subtype entity of {@link IShoppingSaleInquiry},\nand is used when a {@link IShoppingCustomer customer} wants to ask something\nabout a {@link IShoppingSale sale} ({@link IShoppingSaleSnapshot snapshot} at\nthe time) registered by the {@link IShoppingSeller seller}.\n\nAnd, like most shopping malls, `IShoppingSaleQuestion` also provides\na {@link secret} attribute, allowing you to create a \"secret message\" that can\nonly be viewed by the seller and the customer who wrote the question." - }, - "IShoppingSaleInquiryAnswer": { - "type": "object", - "properties": { - "seller": { - "$ref": "#/components/schemas/IShoppingSeller", - "title": "Seller who've written the answer", - "description": "Seller who've written the answer." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IBbsArticle.ISnapshot" - }, - "minItems": 1, - "title": "List of snapshot contents", - "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of article", - "description": "Creation time of article." - } - }, - "required": [ - "seller", - "id", - "snapshots", - "created_at" - ], - "description": "Answers to questions about sale snapshots.\n\n`IShoppingSaleInquiryAnswer` is an entity that embodies the official\nanswer written by the {@link IShoppingSeller seller} to the\n{@link IShoppingSaleInquiry inquiry} written by the\n{@link IShoppingCustomer customer}.\n\nOf course, in addition to writing an official response like this, it is\nalso possible for the seller to communicate with the inqjuiry written\ncustomer and multiple customers through\n{@link IShoppingSaleInquiryComment comments} in the attribution inquiry.\n\nFor refererence, it is not possible to write comments on this answer.\nEncourage people to write comments on the inquiry article. This is to\nprevent comments from being scattered in both inquiry and answer\narticles." - }, - "IBbsArticle.ISnapshot": { - "type": "object", - "properties": { - "id": { - "type": "string", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of snapshot record", - "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticle.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." - }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "id", - "created_at", - "format", - "title", - "body", - "files" - ], - "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." - }, - "IShoppingSaleReview.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingSaleReview.IRequest.ISearch", - "title": "Search conditions", - "description": "Search conditions." - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-created_at" - }, - { - "const": "+created_at" - }, - { - "const": "-nickname" - }, - { - "const": "-answered_at" - }, - { - "const": "-title" - }, - { - "const": "-updated_at" - }, - { - "const": "+nickname" - }, - { - "const": "+answered_at" - }, - { - "const": "+title" - }, - { - "const": "+updated_at" - }, - { - "const": "-score" - }, - { - "const": "+score" - } - ] - }, - "title": "Sorting conditions", - "description": "Sorting conditions." - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of summarized informations with pagination searching/sorting options." - }, - "IShoppingSaleReview.IRequest.ISearch": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "nickname": { - "type": "string" - }, - "answered": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "boolean" - } - ] - }, - "title": { - "type": "string" - }, - "body": { - "type": "string" - }, - "title_or_body": { - "type": "string" - }, - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - }, - "minimum": { - "type": "number", - "minimum": 0, - "maximum": 100 - }, - "maximum": { - "type": "number", - "minimum": 0, - "maximum": 100 - } - } - }, - "IPageIShoppingSaleReview.ISummary": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleReview.ISummary" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSaleReview.ISummary": { - "type": "object", - "properties": { - "score": { - "type": "number", - "title": "Score of the review", - "description": "Score of the review." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who wrote the inquiry", - "description": "Customer who wrote the inquiry." - }, - "answer": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer.ISummary" - } - ], - "title": "Formal answer for the inquiry by the seller", - "description": "Formal answer for the inquiry by the seller." - }, - "read_by_seller": { - "type": "boolean", - "title": "Whether the seller has viewed the inquiry or not", - "description": "Whether the seller has viewed the inquiry or not." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the last snapshot", - "description": "Title of the last snapshot." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Modification time of the article", - "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." - } - }, - "required": [ - "score", - "customer", - "answer", - "read_by_seller", - "id", - "title", - "created_at", - "updated_at" - ], - "description": "Summarized information of the review." - }, - "IPageIShoppingSaleReview.IAbridge": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleReview.IAbridge" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSaleReview.IAbridge": { - "type": "object", - "properties": { - "score": { - "type": "number", - "minimum": 0, - "maximum": 100, - "title": "Score of the review", - "description": "Score of the review." - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who wrote the inquiry", - "description": "Customer who wrote the inquiry." - }, - "answer": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer.IAbridge" - } - ], - "title": "Formal answer for the inquiry by the seller", - "description": "Formal answer for the inquiry by the seller." - }, - "read_by_seller": { - "type": "boolean", - "title": "Whether the seller has viewed the inquiry or not", - "description": "Whether the seller has viewed the inquiry or not." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "title": { - "type": "string", - "title": "Title of the last snapshot", - "description": "Title of the last snapshot." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the article", - "description": "Creation time of the article." - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Modification time of the article", - "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticle.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "score", - "customer", - "answer", - "read_by_seller", - "id", - "title", - "created_at", - "updated_at", - "format", - "body", - "files" - ], - "description": "Abridged information of the review." - }, - "IShoppingSaleReview": { - "type": "object", - "properties": { - "type": { - "const": "review", - "title": "Type of the derived inquiry", - "description": "Type of the derived inquiry.\n\n- `question`: {@link IShoppingSaleQuestion}\n- `review`: {@link IShoppingSaleReview}" - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who wrote the inquiry", - "description": "Customer who wrote the inquiry." - }, - "answer": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingSaleInquiryAnswer" - } - ], - "title": "Formal answer for the inquiry by the seller", - "description": "Formal answer for the inquiry by the seller." - }, - "read_by_seller": { - "type": "boolean", - "title": "Whether the seller has viewed the inquiry or not", - "description": "Whether the seller has viewed the inquiry or not." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "snapshots": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleReview.ISnapshot" - }, - "minItems": 1, - "title": "List of snapshot contents", - "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of article", - "description": "Creation time of article." - } - }, - "required": [ - "type", - "customer", - "answer", - "read_by_seller", - "id", - "snapshots", - "created_at" - ], - "description": "Reviews for sale snapshots.\n\n`IShoppingSaleReview` is a subtype entity of {@link IShoppingSaleInquiry},\nand is used when a {@link IShoppingCustomer customer} purchases a\n{@link IShoppingSale sale} ({@link IShoppingSaleSnapshot snapshot} at the time)\nregistered by the {@link IShoppingSeller seller} as a product and leaves a\nreview and rating for it.\n\nFor reference, `IShoppingSaleReview` and\n{@link IShoppingOrderGod shopping_order_goods} have a logarithmic relationship\nof N: 1, but this does not mean that customers can continue to write reviews\nfor the same product indefinitely. Wouldn't there be restrictions, such as\nif you write a review once, you can write an additional review a month later?" - }, - "IShoppingSaleReview.ISnapshot": { - "type": "object", - "properties": { - "score": { - "type": "number", - "minimum": 0, - "maximum": 100, - "title": "Score of the review", - "description": "Score of the review." - }, - "id": { - "type": "string", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of snapshot record", - "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." - }, - "format": { - "$ref": "#/components/schemas/IBbsArticle.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." - }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." - }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "score", - "id", - "created_at", - "format", - "title", - "body", - "files" - ], - "description": "Snapshot content of the review article." - }, - "IPage.IRequest": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Page request data" - }, - "IPageIShoppingSaleSnapshot.ISummary": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleSnapshot.ISummary" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingSaleSnapshot.ISummary": { - "type": "object", - "properties": { - "price_range": { - "$ref": "#/components/schemas/IShoppingSalePriceRange", - "title": "Price range of the unit", - "description": "Price range of the unit." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Sale", - "description": "Primary Key of Sale." - }, - "snapshot_id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Snapshot", - "description": "Primary Key of Snapshot." - }, - "latest": { - "type": "boolean", - "title": "Whether the snapshot is the latest one or not", - "description": "Whether the snapshot is the latest one or not." - }, - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent.IInvert", - "title": "Description and image content describing the sale", - "description": "Description and image content describing the sale." - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel" - }, - "minItems": 1, - "title": "List of channels and categories", - "description": "List of channels and categories.\n\nWhich channels and categories the sale is registered to." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of search tags", - "description": "List of search tags." - }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit.ISummary" - }, - "minItems": 1, - "title": "List of units", - "description": "List of units.\n\nRecords about individual product composition informations that are sold\nin the sale. Each {@link IShoppingSaleUnit unit} record has configurable\n{@link IShoppingSaleUnitOption options},\n{@link IShoppingSaleUnitOptionCandidate candidate} values for each\noption, and {@link IShoppingSaleUnitStock final stocks} determined by\nselecting every candidate values of each option." - } - }, - "required": [ - "price_range", - "id", - "snapshot_id", - "latest", - "content", - "channels", - "tags", - "units" - ], - "description": "Summarized information of the sale snapshot." - }, - "IShoppingSaleSnapshot": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Sale", - "description": "Primary Key of Sale." - }, - "snapshot_id": { - "type": "string", - "format": "uuid", - "title": "Primary Key of Snapshot", - "description": "Primary Key of Snapshot." - }, - "latest": { - "type": "boolean", - "title": "Whether the snapshot is the latest one or not", - "description": "Whether the snapshot is the latest one or not." - }, - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent", - "title": "Description and image content describing the sale", - "description": "Description and image content describing the sale." - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel" - }, - "minItems": 1, - "title": "List of channels and categories", - "description": "List of channels and categories.\n\nWhich channels and categories the sale is registered to." - }, - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "title": "List of search tags", - "description": "List of search tags." - }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit" - }, - "minItems": 1, - "title": "List of units", - "description": "List of units.\n\nRecords about individual product composition informations that are sold\nin the sale. Each {@link IShoppingSaleUnit unit} record has configurable\n{@link IShoppingSaleUnitOption options},\n{@link IShoppingSaleUnitOptionCandidate candidate} values for each\noption, and {@link IShoppingSaleUnitStock final stocks} determined by\nselecting every candidate values of each option." - } - }, - "required": [ - "id", - "snapshot_id", - "latest", - "content", - "channels", - "tags", - "units" - ], - "description": "Snapshot record of sale.\n\n`IShoppingSaleSnapshot` is an entity that embodies a snapshot of a sale,\nand the ERD (Entity Relationship Diagram) describes the role of the\n`shopping_sale_snapshots` table as follows:\n\n> {@link IShoppingSale shopping_sales} is an entity that embodies\n> \"product sales\" (sales) information registered by the\n> {@link IShoppingSeller seller}. And the main information of the sale is\n> recorded in the sub `shopping_sale_snapshots`, not in the main\n> {@link IShoppingSale shopping_sales}. When a seller changes a previously\n> registered item, the existing {@link IShoppingSale shopping_sales} record\n> is not changed, but a new snapshot record is created.\n>\n> This is to preserve the {@link IShoppingCustomer customer}'s\n> {@link IShoppingOrder purchase history} flawlessly after the customer\n> purchases a specific item, even if the seller changes the components or price\n> of the item. It is also intended to support sellers in so-called A/B testing,\n> which involves changing components or prices and measuring the performance\n> in each case.\n\nBy the way, DTO (Data Transfer Object) level used by the front-end developer,\nit does not distinguish {@link IShoppingSale} and `IShoppingSaleSnapshot`\nstrictly, and generally handles {@link IShoppingSale} and snapshot together.\n\nBut even though the DTO level does not strictly distinguish them, the word and\nconcept of \"snapshot\" is still important, so it is recommended to understand\nthe concept of \"snapshot\" properly." - }, - "IShoppingChannelCategory.ICreate": { - "type": "object", - "properties": { - "parent_id": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ], - "title": "Parent category's ID", - "description": "Parent category's ID." - }, - "name": { - "type": "string", - "title": "Representative name of the category", - "description": "Representative name of the category.\n\nThe name must be unique within the parent category. If no parent exists,\nthen the name must be unique within the channel between no parent\ncategories." - } - }, - "required": [ - "parent_id", - "name" - ], - "description": "Creation information of the category." - }, - "IShoppingChannelCategory": { - "type": "object", - "properties": { - "parent": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingChannelCategory.IInvert" - } - ], - "title": "Parent category info", - "description": "Parent category info." - }, - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IHierarchical" - }, - "title": "List of children categories with hierarchical structure", - "description": "List of children categories with hierarchical structure." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "parent_id": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ], - "title": "Parent category's ID", - "description": "Parent category's ID." - }, - "name": { - "type": "string", - "title": "Representative name of the category", - "description": "Representative name of the category.\n\nThe name must be unique within the parent category. If no parent exists,\nthen the name must be unique within the channel between no parent\ncategories." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - } - }, - "required": [ - "parent", - "children", - "id", - "parent_id", - "name", - "created_at" - ], - "description": "Category of channel.\n\n`IShoppingChannelCategory` is a concept that refers to classification\ncategories within a specific {@link IShoppingChannel channel}, and is exactly\nthe same as the concept commonly referred to as \"category\" in shopping malls.\n\nAnd `IShoppingChannelCategory` is different with {@link IShoppingSection}.\n{@link IShoppingSection} refers to a \"corner\" that is independent spatial\ninformation in the offline market, which cannot simultaneously classified in\na {@link IShoppingSale sale}. Besides, `IShoppingChannelCategory` can be\nclassified into multiple categories in a sale simultaneously.\n\nProduct\t| Section (corner) | Categories\n---------|------------------|-----------------------------------\nBeef\t | Butcher corner | Frozen food, Meat, Favorite food\nGrape | Fruit corner | Fresh food, Favorite food\n\nIn addition, as `IShoppingChannelCategory` has 1:N self recursive relationship,\nit is possible to express below hierarchical structures. Thus, each channel\ncan set their own category classification as they want.\n\n- Food > Meat > Frozen\n- Electronics > Notebook > 15 inches\n- Miscellaneous > Wallet\n\nFurthermore, `IShoppingChannelCategory` is designed to merge between themselves,\nso there is no burden to edit the category at any time." - }, - "IShoppingChannelCategory.IHierarchical": { - "type": "object", - "properties": { - "children": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IHierarchical" - }, - "title": "List of children categories with hierarchical structure", - "description": "List of children categories with hierarchical structure." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "parent_id": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uuid" - } - ], - "title": "Parent category's ID", - "description": "Parent category's ID." - }, - "name": { - "type": "string", - "title": "Representative name of the category", - "description": "Representative name of the category.\n\nThe name must be unique within the parent category. If no parent exists,\nthen the name must be unique within the channel between no parent\ncategories." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - } - }, - "required": [ - "children", - "id", - "parent_id", - "name", - "created_at" - ], - "description": "Hierarchical category information with children categories." - }, - "IRecordMerge": { - "type": "object", - "properties": { - "keep": { - "type": "string", - "format": "uuid", - "title": "Target record to keep after merging", - "description": "Target record to keep after merging.\n\nAfter merge process, {@link absorbed} records would be merged into\nthis {@link keep} record." - }, - "absorbed": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "title": "To be absorbed to {@link keep} after merging", - "description": "To be absorbed to {@link keep} after merging." - } - }, - "required": [ - "keep", - "absorbed" - ], - "description": "Record Merge DTO.\n\n`IRecordMerge` is a structure for merging records.\n\nThe `merge` means that merging multiple {@link IRecordMerge.absorbed}\nrecords into {@link IRecordMerge.keep} instead of deleting\n{@link IRecordMerge.absorbed} records.\n\nIf there're some dependent tables of the target `table` having\nunique constraint on foriegn key column, such dependent tables\nalso perform the merge process, too.\n\nOf course, if there're another dependent tables under those\ndependents, they also perform the merge process recursively as well.\nSuch recursive merge process still works for self-recursive\n(tree-structured) tables." - }, - "IShoppingChannel.ICreate": { - "type": "object", - "properties": { - "code": { - "type": "string", - "title": "Identifier code", - "description": "Identifier code." - }, - "name": { - "type": "string", - "title": "Name of the channel", - "description": "Name of the channel." - } - }, - "required": [ - "code", - "name" - ], - "description": "Creation information of the channel." - }, - "IShoppingChannel.IUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Name of the channel", - "description": "Name of the channel." - } - }, - "required": [ - "name" - ], - "description": "Updating information of the channel." - }, - "IShoppingChannel.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingChannel.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-channel.code" - }, - { - "const": "-channel.name" - }, - { - "const": "-channel.created_at" - }, - { - "const": "+channel.code" - }, - { - "const": "+channel.name" - }, - { - "const": "+channel.created_at" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of the channels with pagination and searching/sorting options." - }, - "IShoppingChannel.IRequest.ISearch": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "IPageIShoppingChannel": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannel" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IPageIShoppingChannel.IHierarchical": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannel.IHierarchical" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingChannel.IHierarchical": { - "type": "object", - "properties": { - "categories": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingChannelCategory.IHierarchical" - }, - "title": "Children categories with hierarchical structure", - "description": "Children categories with hierarchical structure." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of record", - "description": "Creation time of record." - }, - "code": { - "type": "string", - "title": "Identifier code", - "description": "Identifier code." - }, - "name": { - "type": "string", - "title": "Name of the channel", - "description": "Name of the channel." - } - }, - "required": [ - "categories", - "id", - "created_at", - "code", - "name" - ], - "description": "Hierarchical channel information with children categories." - }, - "IShoppingSection.ICreate": { - "type": "object", - "properties": { - "code": { - "type": "string", - "title": "Identifier code", - "description": "Identifier code." - }, - "name": { - "type": "string", - "title": "Representative name of the section", - "description": "Representative name of the section." - } - }, - "required": [ - "code", - "name" - ], - "description": "Creation information of the section." - }, - "IShoppingSection.IUpdate": { - "type": "object", - "properties": { - "name": { - "type": "string", - "title": "Representative name of the section", - "description": "Representative name of the section." - } - }, - "required": [ - "name" - ], - "description": "Updating information of the section." - }, - "IShoppingSection.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingSection.IRequest.ISearch" - }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-section.code" - }, - { - "const": "-section.name" - }, - { - "const": "-section.created_at" - }, - { - "const": "+section.code" - }, - { - "const": "+section.name" - }, - { - "const": "+section.created_at" - } - ] - } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request of the sections with pagination and searching/sorting options." - }, - "IShoppingSection.IRequest.ISearch": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "name": { - "type": "string" - } - } - }, - "IPageIShoppingSection": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSection" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingCustomer.IRefresh": { - "type": "object", - "properties": { - "value": { - "type": "string" - } - }, - "required": [ - "value" - ] - }, - "IShoppingCustomer.IAuthorized": { - "type": "object", - "properties": { - "setHeaders": { - "type": "object", - "properties": { - "Authorization": { - "type": "string" - } - }, - "required": [ - "Authorization" - ] - }, - "token": { - "$ref": "#/components/schemas/IShoppingCustomer.IToken" - }, - "type": { - "const": "customer", - "title": "Discriminant for the type of customer", - "description": "Discriminant for the type of customer." - }, - "member": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingMember" - } - ], - "title": "Membership information", - "description": "Membership information.\n\nIf the customer has joined as a member." - }, - "citizen": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingCitizen" - } - ], - "title": "Citizen information", - "description": "Citizen information.\n\nIf the customer has verified his real name and mobile number." - }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." - }, - "channel": { - "$ref": "#/components/schemas/IShoppingChannel", - "title": "Belonged channel", - "description": "Belonged channel." - }, - "external_user": { - "oneOf": [ - { - "type": "null" - }, - { - "$ref": "#/components/schemas/IShoppingExternalUser" - } - ], - "title": "External user information", - "description": "External user information.\n\nWhen the customer has come frome an external service." - }, - "href": { - "type": "string", - "format": "uri", - "title": "Connection address", - "description": "Connection address.\n\nSame with {@link window.location.href} of client." - }, - "referrer": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "uri" - } - ], - "title": "Referrer address", - "description": "Referrer address.\n\nSame with {@link window.document.referrer} of client." - }, - "ip": { - "oneOf": [ - { - "type": "string", - "format": "ipv4" - }, - { - "type": "string", - "format": "ipv6" - } - ], - "title": "Connection IP Address", - "description": "Connection IP Address." - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the connection record", - "description": "Creation time of the connection record." - } - }, - "required": [ - "setHeaders", - "token", - "type", - "member", - "citizen", - "id", - "channel", - "external_user", - "href", - "referrer", - "ip", - "created_at" - ] - }, - "IShoppingCustomer.IToken": { - "type": "object", - "properties": { - "access": { - "type": "string" - }, - "refresh": { + "card_code": { "type": "string" - }, - "expired_at": { - "type": "string", - "format": "date-time" - }, - "refreshable_until": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "access", - "refresh", - "expired_at", - "refreshable_until" - ] - }, - "IShoppingCustomer.ICreate": { - "type": "object", - "properties": { - "channel_code": { + }, + "card_number": { + "type": "string" + }, + "card_type": { "type": "string" }, - "external_user": { + "customer_name": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/IShoppingExternalUser.ICreate" + "type": "string" } ] }, - "href": { - "type": "string", - "format": "uri" - }, - "referrer": { + "customer_tel": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "uri" + "type": "string" } ] }, - "ip": { + "customer_email": { "oneOf": [ { - "type": "string", - "format": "ipv4" + "type": "null" }, { - "type": "string", - "format": "ipv6" + "type": "string" } ] - } - }, - "required": [ - "channel_code", - "external_user", - "href", - "referrer" - ] - }, - "IShoppingExternalUser.ICreate": { - "type": "object", - "properties": { - "citizen": { + }, + "customer_addr": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/IShoppingCitizen.ICreate" + "type": "string" } - ], - "title": "Citizen activation info", - "description": "Citizen activation info." + ] }, - "application": { - "type": "string", - "title": "Identifier code of the external service", - "description": "Identifier code of the external service.\n\nIt can be same with {@link IShoppingChannel.code} in common." + "customer_postcode": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "uid": { - "type": "string", - "title": "Identifier key of external user from the external system", - "description": "Identifier key of external user from the external system." + "inserted": { + "type": "number" }, - "nickname": { - "type": "string", - "title": "Nickname of external user in the external system", - "description": "Nickname of external user in the external system." + "updated": { + "type": "number" }, - "password": { + "customer_uid": { "type": "string", - "title": "Password of external user from the external system", - "description": "Password of external user from the external system.\n\nThis is a password issued to the user by an external service,\nand is by no means the actual user password. However, for\n{@link IShoppingCustomer customers} who entered the same\napplication and code as the current external system user, this is\nto determine whether to view this as a correct external system\nuser or a violation." - }, - "data": { - "description": "Additional information about external user from the external\nsystem." + "title": "고객 식별자 키", + "description": "고객 식별자 키.\n\n아임포트가 아닌, 이를 이용하는 서비스에서 자체적으로 관리하는 식별자 키.\n\n다만 고객이라기보다 실제로는 카드의 식별자 키로 써야함." } }, "required": [ - "citizen", - "application", - "uid", - "nickname", - "password", - "data" + "pg_provider", + "pg_id", + "card_name", + "card_code", + "card_number", + "card_type", + "customer_name", + "customer_tel", + "customer_email", + "customer_addr", + "customer_postcode", + "inserted", + "updated", + "customer_uid" ], - "description": "Creation information of external user." + "description": "간편 결제 카드 정보." }, - "IShoppingCitizen.ICreate": { + "IIamportSubscription.ICreate": { "type": "object", "properties": { - "mobile": { + "card_number": { "type": "string", - "pattern": "^[0-9]*$", - "title": "Mobile number", - "description": "Mobile number." + "pattern": "\\d{4}-\\d{4}-\\d{4}-\\d{4}", + "title": "카드 번호", + "description": "카드 번호.\n\n형식: XXXX-XXXX-XXXX-XXXX" }, - "name": { + "expiry": { + "type": "string", + "pattern": "^([0-9]{4})-(0[1-9]|1[012])$", + "title": "카드 유효기간", + "description": "카드 유효기간.\n\n형식: YYYY-MM" + }, + "birth": { + "type": "string", + "pattern": "^(([0-9]{2})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))|(\\d{10})$", + "title": "생년월일 YYMMDD 또는 사업자등록번호 10자리", + "description": "생년월일 YYMMDD 또는 사업자등록번호 10자리." + }, + "pwd_2digit": { + "type": "string", + "pattern": "\\d{2}", + "title": "카드 비밀번호 앞 두 자리", + "description": "카드 비밀번호 앞 두 자리." + }, + "cvc": { + "type": "string", + "pattern": "\\d{2}", + "title": "카드 인증번호 (카드 뒷면 3 자리)", + "description": "카드 인증번호 (카드 뒷면 3 자리)." + }, + "customer_name": { + "type": "string" + }, + "customer_tel": { + "type": "string" + }, + "customer_email": { + "type": "string", + "format": "email" + }, + "customr_addr": { + "type": "string" + }, + "customer_postcode": { + "type": "string" + }, + "customer_uid": { "type": "string", - "title": "Real name, or equivalent nickname", - "description": "Real name, or equivalent nickname." + "title": "고객 식별자 키", + "description": "고객 식별자 키.\n\n아임포트가 아닌, 이를 이용하는 서비스에서 자체적으로 관리하는 식별자 키.\n\n다만 고객이라기보다 실제로는 카드의 식별자 키로 써야함." } }, "required": [ - "mobile", - "name" + "card_number", + "expiry", + "birth", + "customer_uid" ], - "description": "Creation information of citizen verification." + "description": "간편 결제 카드 입력 정보." }, - "IShoppingMember.IJoin": { + "IIamportSubscription.IOnetime": { "type": "object", "properties": { - "nickname": { + "customer_uid": { + "type": "string", + "title": "고객 식별자 키", + "description": "고객 식별자 키.\n\n아임포트가 아닌, 이를 이용하는 서비스에서 자체적으로 관리하는 식별자 키.\n\n다만 고객이라기보다 실제로는 카드의 식별자 키로 써야함.\n\n이를 생략시 단순 결제로만 그치며, 카드 정보가 간편 결제용으로 등록되지 아니함." + }, + "card_number": { + "type": "string", + "pattern": "\\d{4}-\\d{4}-\\d{4}-\\d{4}", + "title": "카드 번호", + "description": "카드 번호.\n\n형식: XXXX-XXXX-XXXX-XXXX" + }, + "expiry": { + "type": "string", + "pattern": "^([0-9]{4})-(0[1-9]|1[012])$", + "title": "카드 유효기간", + "description": "카드 유효기간.\n\n형식: YYYY-MM" + }, + "birth": { + "type": "string", + "pattern": "^(([0-9]{2})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))|(\\d{10})$", + "title": "생년월일 YYMMDD 또는 사업자등록번호 10자리", + "description": "생년월일 YYMMDD 또는 사업자등록번호 10자리." + }, + "pwd_2digit": { + "type": "string", + "pattern": "\\d{2}", + "title": "카드 비밀번호 앞 두 자리", + "description": "카드 비밀번호 앞 두 자리." + }, + "cvc": { + "type": "string", + "pattern": "\\d{2}", + "title": "카드 인증번호 (카드 뒷면 3 자리)", + "description": "카드 인증번호 (카드 뒷면 3 자리)." + }, + "customer_name": { + "type": "string" + }, + "customer_tel": { + "type": "string" + }, + "customer_email": { + "type": "string", + "format": "email" + }, + "customr_addr": { + "type": "string" + }, + "customer_postcode": { + "type": "string" + }, + "merchant_uid": { + "type": "string", + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트가 아닌 이를 이용하는 서비스에서 자체적으로 관리하는 식별자 키." + }, + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." + }, + "name": { "type": "string", - "title": "Nickname that uniquely identifies the member", - "description": "Nickname that uniquely identifies the member." + "title": "주문 이름", + "description": "주문 이름." }, - "citizen": { + "currency": { "oneOf": [ { - "type": "null" + "const": "KRW" + }, + { + "const": "USD" + }, + { + "const": "EUR" }, { - "$ref": "#/components/schemas/IShoppingCitizen.ICreate" + "const": "JPY" } ], - "title": "Citizen information", - "description": "Citizen information." + "title": "통화 정보", + "description": "통화 정보." + }, + "tax_free": { + "type": "number", + "title": "면세 공급가액", + "description": "면세 공급가액.\n\n기본값은 0 로써, 알아서 amount 의 1/11 로써 부가세 처리됨." + }, + "card_quota": { + "type": "number", + "title": "할부 개월 수", + "description": "할부 개월 수.\n\n일시불은 0." + }, + "buyer_name": { + "type": "string" + }, + "buyer_email": { + "type": "string", + "format": "email" + }, + "buyer_tel": { + "type": "string" + }, + "buyer_addr": { + "type": "string" + }, + "buyer_postcode": { + "type": "string" + }, + "interest_free_by_merchant": { + "type": "boolean", + "title": "카드할부처리할 때, 할부이자가 발생하는 경우 (카드사 무이자 프로모션 제외)", + "description": "카드할부처리할 때, 할부이자가 발생하는 경우 (카드사 무이자 프로모션 제외).\n\n부과되는 할부이자를 고객대신 가맹점이 지불하고자 PG사와 계약된 경우(현재, 나이스페이먼츠만 지원됨)" + }, + "use_card_point": { + "type": "boolean", + "title": "승인요청시 카드사 포인트 차감하며 결제승인처리할지 flag", + "description": "승인요청시 카드사 포인트 차감하며 결제승인처리할지 flag.\n\nPG사 영업담당자와 계약 당시 사전 협의 필요(현재, 나이스페이먼츠만 지원됨)" }, - "email": { + "custom_data": { "type": "string", - "format": "email", - "title": "Email address of member", - "description": "Email address of member.\n\nIf the member has multiple email addresses, just use one of them." + "title": "임의 정보를 기재할 수 있다", + "description": "임의 정보를 기재할 수 있다." }, - "password": { + "notice_url": { "type": "string", - "title": "Password of the member account", - "description": "Password of the member account." + "format": "uri", + "title": "결제 성공시 통지될 Notification, 웹훅 URL", + "description": "결제 성공시 통지될 Notification, 웹훅 URL." } }, "required": [ - "nickname", - "citizen", - "email", - "password" + "card_number", + "expiry", + "birth", + "merchant_uid", + "amount", + "name" ], - "description": "Joining request info." + "description": "결제 신청 입력 정보." }, - "IShoppingMember.IPasswordChange": { + "IIamportResponseIIamportCardPayment": { "type": "object", "properties": { - "oldbie": { - "type": "string", - "title": "Current password", - "description": "Current password." + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - "newbie": { + "message": { "type": "string", - "title": "The new password to change", - "description": "The new password to change." + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." + }, + "response": { + "$ref": "#/components/schemas/IIamportCardPayment", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ - "oldbie", - "newbie" + "code", + "message", + "response" ], - "description": "Request info of password change." + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingCouponTicket.IRequest": { + "IIamportCardPayment": { "type": "object", "properties": { - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-ticket.created_at" - }, - { - "const": "-ticket.expired_at" - }, - { - "const": "+ticket.created_at" - }, - { - "const": "+ticket.expired_at" - } - ] - } + "card_code": { + "type": "string", + "title": "카드 식별자 코드", + "description": "카드 식별자 코드." }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." + "card_name": { + "type": "string", + "title": "카드 이름", + "description": "카드 이름." + }, + "card_number": { + "type": "string", + "pattern": "\\d{4}-\\d{4}-\\d{4}-\\d{4}", + "title": "카드 번호", + "description": "카드 번호." }, - "limit": { + "card_quota": { "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IPageIShoppingCouponTicket": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." + "title": "할부 개월 수", + "description": "할부 개월 수." }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponTicket" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingCouponTicket.ICreate": { - "type": "object", - "properties": { - "coupon_id": { + "apply_num": { "type": "string", - "format": "uuid" - } - }, - "required": [ - "coupon_id" - ] - }, - "IShoppingDepositCharge.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingDepositCharge.IRequest.ISearch" + "title": "카드사 승인번호", + "description": "카드사 승인번호." }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-created_at" - }, - { - "const": "+created_at" - }, - { - "const": "-value" - }, - { - "const": "-publish.created_at" - }, - { - "const": "-publish.paid_at" - }, - { - "const": "+value" - }, - { - "const": "+publish.created_at" - }, - { - "const": "+publish.paid_at" - } - ] - } + "pay_method": { + "oneOf": [ + { + "const": "card" + }, + { + "const": "samsung" + } + ] }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." + "imp_uid": { + "type": "string", + "title": "결제 정보 {@link IIamportPayment} 의 식별자 키", + "description": "결제 정보 {@link IIamportPayment} 의 식별자 키." }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingDepositCharge.IRequest.ISearch": { - "type": "object", - "properties": { - "from": { + "merchant_uid": { "type": "string", - "format": "date-time" + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." + }, + "name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ], + "title": "주문명, 누락 가능", + "description": "주문명, 누락 가능." }, - "to": { + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." + }, + "cancel_amount": { + "type": "number", + "title": "결제 취소, 환불 총액", + "description": "결제 취소, 환불 총액." + }, + "currency": { + "$ref": "#/components/schemas/IIamportPayment.Currency", + "title": "통화 단위", + "description": "통화 단위." + }, + "receipt_url": { "type": "string", - "format": "date-time" + "format": "uri", + "title": "영수증 URL", + "description": "영수증 URL." }, - "minimum": { - "type": "number" + "cash_receipt_issue": { + "type": "boolean", + "title": "현금 영수증 발행 여부", + "description": "현금 영수증 발행 여부." }, - "maximum": { - "type": "number" + "channel": { + "type": "string" + }, + "pg_provider": { + "type": "string" + }, + "emb_pg_provider": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "pg_id": { + "type": "string" + }, + "pg_tid": { + "type": "string" + }, + "escrow": { + "type": "boolean" + }, + "buyer_name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "buyer_email": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "email" + } + ] + }, + "buyer_tel": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "buyer_addr": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "state": { + "buyer_postcode": { "oneOf": [ { - "const": "pending" + "type": "null" }, { - "const": "published" + "type": "string" + } + ] + }, + "customer_uid": { + "oneOf": [ + { + "type": "null" }, { - "const": "payed" + "type": "string" + } + ] + }, + "customer_uid_usage": { + "oneOf": [ + { + "type": "null" }, { - "const": "cancelled" + "type": "string" } ] }, - "publish": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" + "custom_data": { + "oneOf": [ + { + "type": "null" }, - "payment": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - } - } + { + "type": "string" } - } - } - }, - "required": [ - "state" - ] - }, - "IPageIShoppingDepositCharge": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDepositCharge" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingDepositCharge": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer" + ] }, - "publish": { + "user_agent": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/IShoppingDepositChargePublish" + "type": "string" } ] }, - "created_at": { - "type": "string", - "format": "date-time" - }, - "value": { - "type": "number" - } - }, - "required": [ - "id", - "customer", - "publish", - "created_at", - "value" - ] - }, - "IShoppingDepositChargePublish": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" + "status": { + "$ref": "#/components/schemas/IIamportPayment.Status", + "title": "결제의 현재 (진행) 상태", + "description": "결제의 현재 (진행) 상태." }, - "created_at": { - "type": "string", - "format": "date-time" + "started_at": { + "type": "number", + "title": "결제 신청 일시", + "description": "결제 신청 일시.\n\n리눅스 타임이 쓰임." }, "paid_at": { + "type": "number", + "title": "결제 (지불) 완료 일시", + "description": "결제 (지불) 완료 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "failed_at": { + "type": "number", + "title": "결제 실패 일시", + "description": "결제 실패 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "cancelled_at": { + "type": "number", + "title": "결제 취소 일시", + "description": "결제 취소 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "fail_reason": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } ] }, - "cancelled_at": { + "cancel_reason": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } ] - } - }, - "required": [ - "id", - "created_at", - "paid_at", - "cancelled_at" - ] - }, - "IShoppingDepositCharge.ICreate": { - "type": "object", - "properties": { - "value": { - "type": "number" - } - }, - "required": [ - "value" - ] - }, - "IShoppingDepositChargePublish.ICreate": { - "type": "object", - "properties": { - "vendor": { - "type": "string" - }, - "uid": { - "type": "string" - } - }, - "required": [ - "vendor", - "uid" - ] - }, - "IShoppingDepositHistory.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingDepositHistory.IRequest.ISearch" }, - "sort": { + "cancel_history": { "type": "array", "items": { - "oneOf": [ - { - "const": "-deposit.source" - }, - { - "const": "-deposit.code" - }, - { - "const": "-deposit.direction" - }, - { - "const": "+deposit.source" - }, - { - "const": "+deposit.code" - }, - { - "const": "+deposit.direction" - }, - { - "const": "-history.value" - }, - { - "const": "-history.created_at" - }, - { - "const": "+history.value" - }, - { - "const": "+history.created_at" - } - ] + "$ref": "#/components/schemas/IIamportPaymentCancel" } - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." - }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingDepositHistory.IRequest.ISearch": { - "type": "object", - "properties": { - "deposit": { - "$ref": "#/components/schemas/IShoppingDeposit.IRequest.ISearch" - }, - "citizen_id": { - "type": "string", - "format": "uuid" - }, - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - }, - "minimum": { - "type": "number", - "minimum": 0 - }, - "maximum": { - "type": "number", - "minimum": 0 - } - } - }, - "IPageIShoppingDepositHistory": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDepositHistory" - }, - "title": "List of records", - "description": "List of records." } }, "required": [ - "pagination", - "data" + "card_code", + "card_name", + "card_number", + "card_quota", + "apply_num", + "pay_method", + "imp_uid", + "merchant_uid", + "name", + "amount", + "cancel_amount", + "currency", + "receipt_url", + "cash_receipt_issue", + "channel", + "pg_provider", + "emb_pg_provider", + "pg_id", + "pg_tid", + "escrow", + "buyer_name", + "buyer_email", + "buyer_tel", + "buyer_addr", + "buyer_postcode", + "customer_uid", + "customer_uid_usage", + "custom_data", + "user_agent", + "status", + "started_at", + "paid_at", + "failed_at", + "cancelled_at", + "fail_reason", + "cancel_reason", + "cancel_history" ], - "description": "A page.\n\nCollection of records with pagination indformation." + "description": "카드 결제 정보." }, - "IShoppingDepositHistory": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "citizen": { - "$ref": "#/components/schemas/IShoppingCitizen" - }, - "deposit": { - "$ref": "#/components/schemas/IShoppingDeposit" - }, - "source_id": { - "type": "string", - "format": "uuid" + "IIamportPayment.Currency": { + "oneOf": [ + { + "const": "KRW" }, - "value": { - "type": "number" + { + "const": "USD" }, - "balance": { - "type": "number" + { + "const": "EUR" }, - "created_at": { - "type": "string", - "format": "date-time" + { + "const": "JPY" } - }, - "required": [ - "id", - "citizen", - "deposit", - "source_id", - "value", - "balance", - "created_at" ] }, - "IShoppingMileageHistory.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingMileageHistory.IRequest.ISearch" + "IIamportPayment.Status": { + "oneOf": [ + { + "const": "paid" }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-mileage.source" - }, - { - "const": "-mileage.code" - }, - { - "const": "-mileage.direction" - }, - { - "const": "+mileage.source" - }, - { - "const": "+mileage.code" - }, - { - "const": "+mileage.direction" - }, - { - "const": "-history.value" - }, - { - "const": "-history.created_at" - }, - { - "const": "+history.value" - }, - { - "const": "+history.created_at" - } - ] - } + { + "const": "ready" }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." + { + "const": "failed" }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." + { + "const": "cancelled" } - } + ] }, - "IShoppingMileageHistory.IRequest.ISearch": { + "IIamportPaymentCancel": { "type": "object", "properties": { - "mileage": { - "$ref": "#/components/schemas/IShoppingMileage.IRequest.ISearch" - }, - "citizen_id": { - "type": "string", - "format": "uuid" + "pg_id": { + "type": "string" }, - "from": { - "type": "string", - "format": "date-time" + "pg_tid": { + "type": "string" }, - "to": { - "type": "string", - "format": "date-time" + "amount": { + "type": "number" }, - "minimum": { - "type": "number", - "minimum": 0 + "cancelled_at": { + "type": "number" }, - "maximum": { - "type": "number", - "minimum": 0 - } - } - }, - "IPageIShoppingMileageHistory": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." + "reason": { + "type": "string" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingMileageHistory" - }, - "title": "List of records", - "description": "List of records." + "receipt_url": { + "type": "string", + "format": "uri" } }, "required": [ - "pagination", - "data" + "pg_id", + "pg_tid", + "amount", + "cancelled_at", + "reason", + "receipt_url" ], - "description": "A page.\n\nCollection of records with pagination indformation." + "description": "결제 취소 정보." }, - "IShoppingMileageHistory": { + "IIamportSubscription.IAgain": { "type": "object", "properties": { - "id": { + "merchant_uid": { "type": "string", - "format": "uuid" + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트가 아닌 이를 이용하는 서비스에서 자체적으로 관리하는 식별자 키." }, - "citizen": { - "$ref": "#/components/schemas/IShoppingCitizen" - }, - "mileage": { - "$ref": "#/components/schemas/IShoppingMileage" + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." }, - "source_id": { + "name": { "type": "string", - "format": "uuid" + "title": "주문 이름", + "description": "주문 이름." }, - "value": { - "type": "number" + "currency": { + "oneOf": [ + { + "const": "KRW" + }, + { + "const": "USD" + }, + { + "const": "EUR" + }, + { + "const": "JPY" + } + ], + "title": "통화 정보", + "description": "통화 정보." }, - "balance": { - "type": "number" + "tax_free": { + "type": "number", + "title": "면세 공급가액", + "description": "면세 공급가액.\n\n기본값은 0 로써, 알아서 amount 의 1/11 로써 부가세 처리됨." }, - "created_at": { - "type": "string", - "format": "date-time" - } - }, - "required": [ - "id", - "citizen", - "mileage", - "source_id", - "value", - "balance", - "created_at" - ] - }, - "IShoppingCartCommodity.IRequest": { - "type": "object", - "properties": { - "search": { - "$ref": "#/components/schemas/IShoppingCartCommodity.IRequest.ISearch" + "card_quota": { + "type": "number", + "title": "할부 개월 수", + "description": "할부 개월 수.\n\n일시불은 0." }, - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-seller.created_at" - }, - { - "const": "-seller.goods.payments.real" - }, - { - "const": "-seller.goods.publish_count" - }, - { - "const": "-seller.reviews.average" - }, - { - "const": "-seller.reviews.count" - }, - { - "const": "-goods.publish_count" - }, - { - "const": "-goods.payments.real" - }, - { - "const": "-reviews.average" - }, - { - "const": "-reviews.count" - }, - { - "const": "-sale.created_at" - }, - { - "const": "-sale.updated_at" - }, - { - "const": "-sale.opened_at" - }, - { - "const": "-sale.closed_at" - }, - { - "const": "-sale.content.title" - }, - { - "const": "-sale.price_range.lowest.real" - }, - { - "const": "-sale.price_range.highest.real" - }, - { - "const": "+seller.created_at" - }, - { - "const": "+seller.goods.payments.real" - }, - { - "const": "+seller.goods.publish_count" - }, - { - "const": "+seller.reviews.average" - }, - { - "const": "+seller.reviews.count" - }, - { - "const": "+goods.publish_count" - }, - { - "const": "+goods.payments.real" - }, - { - "const": "+reviews.average" - }, - { - "const": "+reviews.count" - }, - { - "const": "+sale.created_at" - }, - { - "const": "+sale.updated_at" - }, - { - "const": "+sale.opened_at" - }, - { - "const": "+sale.closed_at" - }, - { - "const": "+sale.content.title" - }, - { - "const": "+sale.price_range.lowest.real" - }, - { - "const": "+sale.price_range.highest.real" - }, - { - "const": "-commodity.price" - }, - { - "const": "-commodity.volume" - }, - { - "const": "-commodity.volumed_price" - }, - { - "const": "-commodity.created_at" - }, - { - "const": "+commodity.price" - }, - { - "const": "+commodity.volume" - }, - { - "const": "+commodity.volumed_price" - }, - { - "const": "+commodity.created_at" - } - ] - } + "buyer_name": { + "type": "string" }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." + "buyer_email": { + "type": "string", + "format": "email" }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IShoppingCartCommodity.IRequest.ISearch": { - "type": "object", - "properties": { - "min_price": { - "type": "number" + "buyer_tel": { + "type": "string" }, - "max_price": { - "type": "number" + "buyer_addr": { + "type": "string" }, - "min_volumed_price": { - "type": "number" + "buyer_postcode": { + "type": "string" }, - "max_volumed_price": { - "type": "number" + "interest_free_by_merchant": { + "type": "boolean", + "title": "카드할부처리할 때, 할부이자가 발생하는 경우 (카드사 무이자 프로모션 제외)", + "description": "카드할부처리할 때, 할부이자가 발생하는 경우 (카드사 무이자 프로모션 제외).\n\n부과되는 할부이자를 고객대신 가맹점이 지불하고자 PG사와 계약된 경우(현재, 나이스페이먼츠만 지원됨)" }, - "sale": { - "$ref": "#/components/schemas/IShoppingSale.IRequest.ISearch" - } - } - }, - "IPageIShoppingCartCommodity": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." + "use_card_point": { + "type": "boolean", + "title": "승인요청시 카드사 포인트 차감하며 결제승인처리할지 flag", + "description": "승인요청시 카드사 포인트 차감하며 결제승인처리할지 flag.\n\nPG사 영업담당자와 계약 당시 사전 협의 필요(현재, 나이스페이먼츠만 지원됨)" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCartCommodity" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingCartCommodity.ICreate": { - "type": "object", - "properties": { - "sale_id": { + "custom_data": { "type": "string", - "format": "uuid", - "title": "Target sale's {@link IShoppingSale.id}", - "description": "Target sale's {@link IShoppingSale.id}." - }, - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCartCommodityStock.ICreate" - }, - "minItems": 1, - "title": "List of the stocks to be purchased", - "description": "List of the stocks to be purchased." + "title": "임의 정보를 기재할 수 있다", + "description": "임의 정보를 기재할 수 있다." }, - "volume": { - "type": "integer", - "minimum": 1, - "title": "Volume of the commodity to purchase", - "description": "Volume of the commodity to purchase.\n\nA value indicating how many sets would be multiplied to the children\n{@link IShoppingSaleUnitStock.IInvert.quantity} values." + "notice_url": { + "type": "string", + "format": "uri", + "title": "결제 성공시 통지될 Notification, 웹훅 URL", + "description": "결제 성공시 통지될 Notification, 웹훅 URL." }, - "accumulate": { - "type": "boolean", - "title": "Whether to accumulate the volume or not", - "description": "Whether to accumulate the volume or not.\n\nIf this attribute is not `false` and there's same commodity that\ncomposed with same stocks and options, then the volume will be\naccumulated to the existed one.\n\nOtherwise, duplicated commodity would be newly created." + "customer_uid": { + "type": "string", + "title": "고객 식별자 키", + "description": "고객 식별자 키.\n\n아임포트가 아닌, 이를 이용하는 서비스에서 자체적으로 관리하는 식별자 키.\n\n다만 고객이라기보다 실제로는 카드의 식별자 키로 써야함." } }, "required": [ - "sale_id", - "stocks", - "volume" + "merchant_uid", + "amount", + "name", + "customer_uid" ], - "description": "Creation information of a shopping cart commodity." + "description": "간편 결제 카드로 결제 신청 입력 정보." }, - "IShoppingCartCommodityStock.ICreate": { + "IIamportResponseIIamportCertification": { "type": "object", "properties": { - "unit_id": { - "type": "string", - "format": "uuid", - "title": "Target unit's {@link IShoppingSaleUnit.id}", - "description": "Target unit's {@link IShoppingSaleUnit.id}." - }, - "stock_id": { - "type": "string", - "format": "uuid", - "title": "Target stock's {@link IShoppingSaleUnitStock.id}", - "description": "Target stock's {@link IShoppingSaleUnitStock.id}.\n\nIt must be matched with the {@link choices} property." + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCartCommodityStockChoice.ICreate" - }, - "title": "Creation information of the choices for each option", - "description": "Creation information of the choices for each option." + "message": { + "type": "string", + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." }, - "quantity": { - "type": "integer", - "minimum": 1, - "title": "Quantity of the stock to purchase", - "description": "Quantity of the stock to purchase.\n\nThis value is multiplied by the {@link IShoppingCartCommodity.volume}." + "response": { + "$ref": "#/components/schemas/IIamportCertification", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ - "unit_id", - "stock_id", - "choices", - "quantity" + "code", + "message", + "response" ], - "description": "Creation information of the commodity stock of shopping cart.\n\nWhen record being created, its corresponding structure would be\n{@link IShoppingSaleSnapshotUnit.IInvert} and\n{@link IShoppingSaleSnapshotUnitStock.IInvert}." + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingCartCommodityStockChoice.ICreate": { + "IIamportCertification": { "type": "object", "properties": { - "option_id": { + "imp_uid": { "type": "string", - "format": "uuid", - "title": "Target option's {@link IShoppingSaleUnitOption.id}", - "description": "Target option's {@link IShoppingSaleUnitOption.id}." + "title": "아임포트가 발급해 준 식별자 번호", + "description": "아임포트가 발급해 준 식별자 번호." }, - "candidate_id": { + "merchant_uid": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "uuid" + "type": "string" } ], - "title": "Target candidate's {@link IShoppingSaleUnitOptionCandidate.id}", - "description": "Target candidate's {@link IShoppingSaleUnitOptionCandidate.id}.\n\nWhen target option's type is `select`, then this attribute is not\n`null` but has a value." + "title": "서비스로부터의 식별자 키", + "description": "서비스로부터의 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." + }, + "name": { + "type": "string", + "title": "본인인증대상자 성명", + "description": "본인인증대상자 성명." + }, + "gender": { + "type": "string", + "title": "성별", + "description": "성별." + }, + "birth": { + "type": "number", + "title": "생년월일", + "description": "생년월일.\n\n리눅스 타임이 쓰인다." + }, + "birthday": { + "type": "string", + "pattern": "^([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$", + "title": "생년월일, YYYYMMDD 형식", + "description": "생년월일, YYYYMMDD 형식." + }, + "foreigner": { + "type": "boolean", + "title": "외국인 여부", + "description": "외국인 여부." }, - "value": { + "phone": { + "type": "string", + "title": "본인인증 대상자 핸드폰 번호", + "description": "본인인증 대상자 핸드폰 번호." + }, + "carrier": { "oneOf": [ { - "type": "null" - }, - { - "type": "string" + "const": "SKT" }, { - "type": "number" + "const": "KT" }, { - "type": "boolean" + "const": "LGT" } ], - "title": "Written value about the option", - "description": "Written value about the option.\n\nWhen target option's type is not `select`, but an atomic type value\nlike `boolean`, `number` or `string`, then this attribute is not\n`null` but has the matched atomic value." - } - }, - "required": [ - "option_id", - "candidate_id", - "value" - ], - "description": "Creation information of the choice for each option.\n\nWhen record being created, its corresponding structure would be\n{@link IShoppingSaleUnitStockChoice.IInvert}." - }, - "IShoppingCartCommodity.IUpdate": { - "type": "object", - "properties": { - "volume": { - "type": "integer", - "minimum": 1, - "title": "Volume of the commodity to purchase", - "description": "Volume of the commodity to purchase.\n\nA value indicating how many sets would be multiplied to the children\n{@link IShoppingSaleUnitStock.IInvert.quantity} values." + "title": "본인인증 대상자 통신사 코드", + "description": "본인인증 대상자 통신사 코드." + }, + "certified": { + "type": "boolean", + "title": "OTP 인증 여부", + "description": "OTP 인증 여부." + }, + "certified_at": { + "type": "number", + "title": "OTP 인증 일시", + "description": "OTP 인증 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "unique_key": { + "type": "string", + "description": "뭔지 잘 모름, 용도 아시는 분?" + }, + "unique_in_site": { + "type": "string", + "description": "뭔지 잘 모름, 용도 아시는 분?" + }, + "pg_tid": { + "type": "string", + "description": "뭔지 잘 모름, 용도 아시는 분?" + }, + "pg_provider": { + "type": "string", + "title": "PG 제공자", + "description": "PG 제공자." + }, + "origin": { + "type": "string", + "description": "뭔지 잘 모름, 용도 아시는 분?" + }, + "__otp": { + "type": "string", + "title": "(테스트 전용) OTP 코드", + "description": "(테스트 전용) OTP 코드.\n\n오직 `fake-iamport-server` 에서만 쓰이는 속성으로써, 본인인증을 시뮬레이션할 때,\n어떠한 OTP 코드가 발급되었는 지를 확인하기 위하여 사용된다. 이를 이용하여\n{@link functional.certifications.otp.confirm} 함수를 호출하면, 본인인증을 완료할\n수 있다." } }, "required": [ - "volume" + "imp_uid", + "merchant_uid", + "name", + "gender", + "birth", + "birthday", + "foreigner", + "phone", + "carrier", + "certified", + "certified_at", + "unique_key", + "unique_in_site", + "pg_tid", + "pg_provider", + "origin" ], - "description": "Update information of a shopping cart commodity." + "description": "본인 인증 내역.\n\n`IIamportCertification` 은 아임포트의 본인인증 정보를 형상화한 자료구조 인터페이스이다.\n\n단, `IIamportCertification` 레코드의 존재가 곧 본인인증의 완결을 뜻하는 것은 아니다.\n{@link IIamportCertification.certified} 값이 `true` 여야만이 비로소, 본인인증\n대상자가 자신의 핸드폰 번호로 전송된 OTP 를 아임포트의 본인인증 팝업창에 정확히 적어,\n본인인증을 완료했음을 의미한다." }, - "IShoppingCartDiscountable.IRequest": { + "IIamportCertification.ICreate": { "type": "object", "properties": { - "commodity_ids": { + "name": { + "type": "string", + "title": "본인인증대상자 성명", + "description": "본인인증대상자 성명." + }, + "phone": { + "type": "string", + "title": "본인인증 대상자 핸드폰 번호", + "description": "본인인증 대상자 핸드폰 번호.\n\n핸드폰 번호에 \"-\" 값이 들어가던 아니던 상관 없음.\n\n다만, 내부적으로는 \"-\" 값을 제거하여 처리한다." + }, + "birth": { + "type": "string", + "pattern": "^([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$", + "title": "생년월일", + "description": "생년월일.\n\nYYYYMMDD 형식." + }, + "gender_digit": { + "type": "string", + "title": "주민등록 뒷부분 첫 자리", + "description": "주민등록 뒷부분 첫 자리." + }, + "carrier": { "oneOf": [ { - "type": "null" + "const": "SKT" }, { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "const": "KT" + }, + { + "const": "LGT" } - ] - }, - "pseudos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCartCommodity.ICreate" - } - } - }, - "required": [ - "commodity_ids", - "pseudos" - ] - }, - "IShoppingCartDiscountable": { - "type": "object", - "properties": { - "deposit": { - "type": "number" - }, - "mileage": { - "type": "number" + ], + "title": "본인인증 대상자 통신사 코드", + "description": "본인인증 대상자 통신사 코드." }, - "combinations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCartDiscountable.ICombination" - } - } - }, - "required": [ - "deposit", - "mileage", - "combinations" - ] - }, - "IShoppingCartDiscountable.ICombination": { - "type": "object", - "properties": { - "coupons": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCoupon" - } + "is_mvno": { + "type": "boolean", + "title": "알뜰폰 여부", + "description": "알뜰폰 여부." }, - "tickets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponTicket" - } + "commpany": { + "type": "string", + "title": "가맹점 서비스 명칭 또는 domain URL", + "description": "가맹점 서비스 명칭 또는 domain URL.\n\nKISA 에서 대상자에게 발송하는 SMS에 안내될 서비스 명칭." }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCartDiscountable.IEntry" - } + "merchant_uid": { + "type": "string", + "title": "귀사 서비스에서의 본인인증 식별자 키", + "description": "귀사 서비스에서의 본인인증 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." }, - "amount": { - "type": "number" + "pg": { + "type": "string", + "title": "PG 사 구분자", + "description": "PG 사 구분자.\n\n다날 상점아이디를 2개 이상 동시에 사용하시려는 경우에 설정하면 된다.\n\n**danal.{상점아이디}** 형태로 지정." } }, "required": [ - "coupons", - "tickets", - "entries", - "amount" - ] + "name", + "phone", + "birth", + "gender_digit", + "carrier" + ], + "description": "본인 인증 입력 정보." }, - "IShoppingCartDiscountable.IEntry": { + "IIamportResponseIIamportCertification.IAccessor": { "type": "object", "properties": { - "commodity_id": { - "type": "string", - "format": "uuid" - }, - "pseudo": { - "type": "boolean" + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - "coupon_id": { + "message": { "type": "string", - "format": "uuid" + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." }, - "amount": { - "type": "number" + "response": { + "$ref": "#/components/schemas/IIamportCertification.IAccessor", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ - "commodity_id", - "pseudo", - "coupon_id", - "amount" - ] + "code", + "message", + "response" + ], + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingOrder.ICreate": { + "IIamportCertification.IAccessor": { "type": "object", "properties": { - "goods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrderGood.ICreate" - }, - "title": "List of goods in the order", - "description": "List of goods in the order." + "imp_uid": { + "type": "string", + "title": "본인인증정보의 식별자 키", + "description": "본인인증정보의 식별자 키." } }, "required": [ - "goods" + "imp_uid" ], - "description": "Creation information of the order appliance." + "description": "본인인증 정보의 접근자 구조체." }, - "IShoppingOrderGood.ICreate": { + "IIamportCertification.IConfirm": { "type": "object", "properties": { - "commodity_id": { + "otp": { "type": "string", - "format": "uuid", - "title": "Target commodity's {@link IShoppingCartCommodity.id}", - "description": "Target commodity's {@link IShoppingCartCommodity.id}." - }, - "volume": { - "type": "integer", - "title": "Volume of the good", - "description": "Volume of the good.\n\nThe value multiplied to {@link IShoppingCartCommodityStock.quantity}.\nIt's purpose is exactly same with {@link IShoppingCartCommodity.volume},\nbut rewritten because the {@link IShoppingCartCommodity} records are reusable\nuntil payment." + "title": "SMS 로 전송된 본인인증 번호", + "description": "SMS 로 전송된 본인인증 번호." } }, "required": [ - "commodity_id", - "volume" + "otp" ], - "description": "Creation information of the good." + "description": "본인인증 승인을 위한 입력 정보." }, - "IShoppingOrderDiscountable.IRequest": { + "IIamportPayment.IWebhook": { "type": "object", "properties": { - "good_ids": { + "imp_uid": { + "type": "string", + "title": "결제 정보 {@link IIamportPayment} 의 식별자 키", + "description": "결제 정보 {@link IIamportPayment} 의 식별자 키." + }, + "merchant_uid": { + "type": "string", + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." + }, + "status": { "oneOf": [ { - "type": "null" + "const": "paid" }, { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "const": "ready" + }, + { + "const": "failed" + }, + { + "const": "cancelled" } - ] - } - }, - "required": [ - "good_ids" - ] - }, - "IShoppingOrderDiscountable": { - "type": "object", - "properties": { - "deposit": { - "type": "number" - }, - "mileage": { - "type": "number" - }, - "combinations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrderDiscountable.ICombination" - } + ], + "title": "현재 상태", + "description": "현재 상태." } }, "required": [ - "deposit", - "mileage", - "combinations" - ] + "imp_uid", + "merchant_uid", + "status" + ], + "description": "웹훅 데이터." }, - "IShoppingOrderDiscountable.ICombination": { + "IIamportPayment.IQuery": { "type": "object", "properties": { - "coupons": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCoupon" - } - }, - "tickets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingCouponTicket" - } - }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrderDiscountable.IEntry" - } - }, - "amount": { - "type": "number" + "extension": { + "type": "boolean", + "title": "페이팔의 경우, 이 값을 `true` 로 할 것", + "description": "페이팔의 경우, 이 값을 `true` 로 할 것." } }, - "required": [ - "coupons", - "tickets", - "entries", - "amount" - ] + "description": "결제 수단이 페이팔인 경우, 페이팔의 구매자 보호정책에 의해 결제 승인 시점에\nPending 상태를 만든 후, 내부 심사등을 통해 최종 결제 완료라고 변경함.\n\n`iamport` 의 기술적 이슈로 해당 상태를 status: failed 로 기록함. 추후\n페이팔에서 최종결제완료로 변경된 경우, `iamport` 에서 `paid` 로 변경 후,\n해당건에 대한 웹훅 발송. `iamport` 를 사용하는 고객사에서는, failed 로 이미\n처리된 결제건에 대한 paid 상태의 웹훅을 받는 문제점이 생김.\n\n이에, `iamport` 에서 제공하는 `/payment/{imp_uid}` 에 query-string 으로\n`extension=true` 옵션을 추가해야 함" }, - "IShoppingOrderDiscountable.IEntry": { + "IIamportResponseIIamportPayment": { "type": "object", "properties": { - "good_id": { - "type": "string", - "format": "uuid" + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - "coupon_id": { + "message": { "type": "string", - "format": "uuid" - }, - "amount": { - "type": "number" - } - }, - "required": [ - "good_id", - "coupon_id", - "amount" - ] - }, - "IShoppingOrderPrice.ICreate": { - "type": "object", - "properties": { - "deposit": { - "type": "number" - }, - "mileage": { - "type": "number" + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." }, - "coupon_ids": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } + "response": { + "$ref": "#/components/schemas/IIamportPayment", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ - "deposit", - "mileage", - "coupon_ids" - ] + "code", + "message", + "response" + ], + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingOrderPublish.ICashCreate": { - "type": "object", - "properties": { - "type": { - "const": "cash" + "IIamportPayment": { + "oneOf": [ + { + "$ref": "#/components/schemas/IIamportCardPayment" }, - "address": { - "$ref": "#/components/schemas/IShoppingAddress.ICreate" + { + "$ref": "#/components/schemas/IIamportTransferPayment" }, - "vendor": { - "type": "string" + { + "$ref": "#/components/schemas/IIamportVBankPayment" }, - "uid": { - "type": "string" + { + "$ref": "#/components/schemas/IIamportPayment.IBasephonekpaykakaopaypaycolpayssgpaytosspayculturelandsmartculturehappymoneybooknlifepoint" } - }, - "required": [ - "type", - "address", - "vendor", - "uid" - ] + ], + "description": "결제 정보.\n\n`IIamportPayment` 는 아임포트의 결제 정보를 형상화한 자료구조이자 유니언 타입의\n인터페이스로써, if condition 을 통하여 method 값을 특정하면, 파생 타입이 자동으로\n지정된다.\n\n```typescript\nif (payment.pay_method === \"card\")\n payment.card_number; // payment be IIamportCardPayment\n```" }, - "IShoppingAddress.ICreate": { + "IIamportTransferPayment": { "type": "object", "properties": { - "mobile": { + "bank_code": { "type": "string", - "pattern": "^[0-9]*$", - "title": "Mobile number to contact", - "description": "Mobile number to contact." + "title": "은행 식별자 코드", + "description": "은행 식별자 코드." }, - "name": { + "bank_name": { "type": "string", - "title": "Representative name of the address", - "description": "Representative name of the address.\n\nSometimes be receiver's name, and sometimes be place name." + "title": "은행 이름", + "description": "은행 이름." }, - "country": { - "type": "string", - "title": "Country name", - "description": "Country name." + "pay_method": { + "const": "trans" }, - "province": { + "imp_uid": { "type": "string", - "title": "Province name", - "description": "Province name." + "title": "결제 정보 {@link IIamportPayment} 의 식별자 키", + "description": "결제 정보 {@link IIamportPayment} 의 식별자 키." }, - "city": { + "merchant_uid": { "type": "string", - "title": "City name", - "description": "City name." + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." }, - "department": { - "type": "string", - "title": "Department name", - "description": "Department name." + "name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ], + "title": "주문명, 누락 가능", + "description": "주문명, 누락 가능." }, - "possession": { - "type": "string", - "title": "Detailed address containing street name, building number, and room number", - "description": "Detailed address containing street name, building number, and room number." + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." }, - "zip_code": { + "cancel_amount": { + "type": "number", + "title": "결제 취소, 환불 총액", + "description": "결제 취소, 환불 총액." + }, + "currency": { + "$ref": "#/components/schemas/IIamportPayment.Currency", + "title": "통화 단위", + "description": "통화 단위." + }, + "receipt_url": { "type": "string", - "title": "Zip code, or postal code", - "description": "Zip code, or postal code." + "format": "uri", + "title": "영수증 URL", + "description": "영수증 URL." + }, + "cash_receipt_issue": { + "type": "boolean", + "title": "현금 영수증 발행 여부", + "description": "현금 영수증 발행 여부." + }, + "channel": { + "type": "string" + }, + "pg_provider": { + "type": "string" + }, + "emb_pg_provider": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "pg_id": { + "type": "string" + }, + "pg_tid": { + "type": "string" + }, + "escrow": { + "type": "boolean" + }, + "buyer_name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "buyer_email": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "email" + } + ] }, - "special_note": { + "buyer_tel": { "oneOf": [ { "type": "null" @@ -16263,581 +2006,504 @@ { "type": "string" } - ], - "title": "Special description if required", - "description": "Special description if required." - } - }, - "required": [ - "mobile", - "name", - "country", - "province", - "city", - "department", - "possession", - "zip_code", - "special_note" - ] - }, - "IShoppingOrderPublish.IZeroCreate": { - "type": "object", - "properties": { - "type": { - "const": "zero" - }, - "address": { - "$ref": "#/components/schemas/IShoppingAddress.ICreate" - } - }, - "required": [ - "type", - "address" - ] - }, - "IShoppingSaleQuestion.ICreate": { - "type": "object", - "properties": { - "secret": { - "type": "boolean", - "title": "Whether the question article is secret or not", - "description": "Whether the question article is secret or not.\n\nIf secret article, only the writer customer and related seller can see\nthe detailed content." + ] }, - "format": { + "buyer_addr": { "oneOf": [ { - "const": "html" + "type": "null" }, { - "const": "md" + "type": "string" + } + ] + }, + "buyer_postcode": { + "oneOf": [ + { + "type": "null" }, { - "const": "txt" + "type": "string" } - ], - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + ] }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." + "customer_uid": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." + "customer_uid_usage": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "secret", - "format", - "title", - "body", - "files" - ], - "description": "Creation information of the question." - }, - "IBbsArticle.ICreate": { - "type": "object", - "properties": { - "format": { + "custom_data": { "oneOf": [ { - "const": "html" + "type": "null" }, { - "const": "md" + "type": "string" + } + ] + }, + "user_agent": { + "oneOf": [ + { + "type": "null" }, { - "const": "txt" + "type": "string" } - ], - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + ] }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." + "status": { + "$ref": "#/components/schemas/IIamportPayment.Status", + "title": "결제의 현재 (진행) 상태", + "description": "결제의 현재 (진행) 상태." }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." + "started_at": { + "type": "number", + "title": "결제 신청 일시", + "description": "결제 신청 일시.\n\n리눅스 타임이 쓰임." }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "format", - "title", - "body", - "files" - ], - "description": "Creation information of the article." - }, - "IShoppingSaleReview.ICreate": { - "type": "object", - "properties": { - "good_id": { - "type": "string", - "format": "uuid", - "title": "Target good's {@link IShoppingOrderGood.id}", - "description": "Target good's {@link IShoppingOrderGood.id}." + "paid_at": { + "type": "number", + "title": "결제 (지불) 완료 일시", + "description": "결제 (지불) 완료 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "failed_at": { + "type": "number", + "title": "결제 실패 일시", + "description": "결제 실패 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." }, - "score": { + "cancelled_at": { "type": "number", - "minimum": 0, - "maximum": 100, - "title": "Score of the review", - "description": "Score of the review." + "title": "결제 취소 일시", + "description": "결제 취소 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." }, - "format": { + "fail_reason": { "oneOf": [ { - "const": "html" + "type": "null" }, { - "const": "md" + "type": "string" + } + ] + }, + "cancel_reason": { + "oneOf": [ + { + "type": "null" }, { - "const": "txt" + "type": "string" } - ], - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." - }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." - }, - "body": { - "type": "string", - "title": "Content body of article", - "description": "Content body of article." + ] }, - "files": { + "cancel_history": { "type": "array", "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." + "$ref": "#/components/schemas/IIamportPaymentCancel" + } } }, "required": [ - "good_id", - "score", - "format", - "title", - "body", - "files" + "bank_code", + "bank_name", + "pay_method", + "imp_uid", + "merchant_uid", + "name", + "amount", + "cancel_amount", + "currency", + "receipt_url", + "cash_receipt_issue", + "channel", + "pg_provider", + "emb_pg_provider", + "pg_id", + "pg_tid", + "escrow", + "buyer_name", + "buyer_email", + "buyer_tel", + "buyer_addr", + "buyer_postcode", + "customer_uid", + "customer_uid_usage", + "custom_data", + "user_agent", + "status", + "started_at", + "paid_at", + "failed_at", + "cancelled_at", + "fail_reason", + "cancel_reason", + "cancel_history" ], - "description": "Creation information of the review." + "description": "계좌 이체 결제 정보." }, - "IShoppingSaleReview.IUpdate": { + "IIamportVBankPayment": { "type": "object", "properties": { - "score": { + "vbank_code": { + "type": "string", + "title": "가상 계좌 식별자 코드", + "description": "가상 계좌 식별자 코드." + }, + "vbank_name": { + "type": "string", + "description": "가상 게좌 이름" + }, + "vbank_num": { + "type": "string", + "description": "가상 계좌 번호" + }, + "vbank_holder": { + "type": "string", + "title": "가상 계좌 예금주", + "description": "가상 계좌 예금주." + }, + "vbank_date": { + "type": "number", + "title": "가상 계좌 입금 만료 기한", + "description": "가상 계좌 입금 만료 기한." + }, + "vbank_issued_at": { "type": "number", - "minimum": 0, - "maximum": 100, - "title": "Score of the review", - "description": "Score of the review." + "title": "가상 계좌 개설 일시", + "description": "가상 계좌 개설 일시." + }, + "pay_method": { + "const": "vbank" + }, + "imp_uid": { + "type": "string", + "title": "결제 정보 {@link IIamportPayment} 의 식별자 키", + "description": "결제 정보 {@link IIamportPayment} 의 식별자 키." + }, + "merchant_uid": { + "type": "string", + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." }, - "format": { + "name": { "oneOf": [ { - "const": "html" - }, - { - "const": "md" + "type": "null" }, { - "const": "txt" + "type": "string" } ], - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + "title": "주문명, 누락 가능", + "description": "주문명, 누락 가능." }, - "title": { - "type": "string", - "title": "Title of article", - "description": "Title of article." + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." + }, + "cancel_amount": { + "type": "number", + "title": "결제 취소, 환불 총액", + "description": "결제 취소, 환불 총액." + }, + "currency": { + "$ref": "#/components/schemas/IIamportPayment.Currency", + "title": "통화 단위", + "description": "통화 단위." }, - "body": { + "receipt_url": { "type": "string", - "title": "Content body of article", - "description": "Content body of article." + "format": "uri", + "title": "영수증 URL", + "description": "영수증 URL." }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." - } - }, - "required": [ - "score", - "format", - "title", - "body", - "files" - ], - "description": "Updating information of the review." - }, - "IShoppingSeller.IJoin": { - "type": "object", - "properties": {} - }, - "IShoppingDelivery.IRequest": { - "type": "object", - "properties": { - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-delivery.created_at" - }, - { - "const": "+delivery.created_at" - } - ] - } + "cash_receipt_issue": { + "type": "boolean", + "title": "현금 영수증 발행 여부", + "description": "현금 영수증 발행 여부." }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." + "channel": { + "type": "string" }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - } - }, - "IPageIShoppingDelivery.IInvert": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." + "pg_provider": { + "type": "string" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDelivery.IInvert" - }, - "title": "List of records", - "description": "List of records." - } - }, - "required": [ - "pagination", - "data" - ], - "description": "A page.\n\nCollection of records with pagination indformation." - }, - "IShoppingDelivery.IInvert": { - "type": "object", - "properties": { - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrder.IInvertFromDelivery" - }, - "minItems": 1, - "title": "List of orders of the delivery", - "description": "List of orders of the delivery." + "emb_pg_provider": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." + "pg_id": { + "type": "string" }, - "seller": { - "$ref": "#/components/schemas/IShoppingSeller", - "title": "Seller who've delivered the goods", - "description": "Seller who've delivered the goods." + "pg_tid": { + "type": "string" }, - "journeys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney" - }, - "title": "List of journeys of the delivery", - "description": "List of journeys of the delivery." + "escrow": { + "type": "boolean" }, - "pieces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryPiece" - }, - "minItems": 1, - "title": "List of pieces of the delivery", - "description": "List of pieces of the delivery." + "buyer_name": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "shippers": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryShipper" - }, - "title": "List of shippers of the delivery", - "description": "List of shippers of the delivery." + "buyer_email": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "format": "email" + } + ] }, - "state": { - "$ref": "#/components/schemas/IShoppingDelivery.State", - "title": "State of the delivery", - "description": "State of the delivery." + "buyer_tel": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - } - }, - "required": [ - "orders", - "id", - "seller", - "journeys", - "pieces", - "shippers", - "state", - "created_at" - ], - "description": "Invert information of the delivery." - }, - "IShoppingOrder.IInvertFromDelivery": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." + "buyer_addr": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "buyer_postcode": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "customer": { - "$ref": "#/components/schemas/IShoppingCustomer", - "title": "Customer who've applied for the order", - "description": "Customer who've applied for the order." + "customer_uid": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "goods": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingOrderGood" - }, - "minItems": 1, - "title": "List of goods in the order", - "description": "List of goods in the order." + "customer_uid_usage": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "price": { - "$ref": "#/components/schemas/IShoppingOrderPrice", - "title": "Price information including discounts", - "description": "Price information including discounts." + "custom_data": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "publish": { + "user_agent": { "oneOf": [ { "type": "null" }, { - "$ref": "#/components/schemas/IShoppingOrderPublish.IInvertFromDelivery" + "type": "string" } - ], - "title": "Order completion and payment information", - "description": "Order completion and payment information." + ] }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." - } - }, - "required": [ - "id", - "customer", - "goods", - "price", - "publish", - "created_at" - ], - "description": "Invert information from delivery." - }, - "IShoppingOrderPublish.IInvertFromDelivery": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." + "status": { + "$ref": "#/components/schemas/IIamportPayment.Status", + "title": "결제의 현재 (진행) 상태", + "description": "결제의 현재 (진행) 상태." }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record." + "started_at": { + "type": "number", + "title": "결제 신청 일시", + "description": "결제 신청 일시.\n\n리눅스 타임이 쓰임." }, "paid_at": { + "type": "number", + "title": "결제 (지불) 완료 일시", + "description": "결제 (지불) 완료 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "failed_at": { + "type": "number", + "title": "결제 실패 일시", + "description": "결제 실패 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "cancelled_at": { + "type": "number", + "title": "결제 취소 일시", + "description": "결제 취소 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "fail_reason": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } - ], - "title": "Time when the order was paid", - "description": "Time when the order was paid." + ] }, - "cancelled_at": { + "cancel_reason": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } - ], - "title": "Time when the payment was cancelled", - "description": "Time when the payment was cancelled." - }, - "address": { - "$ref": "#/components/schemas/IShoppingAddress", - "title": "Address where the {@link IShoppingOrderGood goods} to be delivered", - "description": "Address where the {@link IShoppingOrderGood goods} to be delivered." - } - }, - "required": [ - "id", - "created_at", - "paid_at", - "cancelled_at", - "address" - ], - "description": "Invert information from the delivery." - }, - "IShoppingDelivery.ICreate": { - "type": "object", - "properties": { - "pieces": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryPiece.ICreate" - }, - "minItems": 1, - "title": "List of pieces of the delivery", - "description": "List of pieces of the delivery." - }, - "journeys": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingDeliveryJourney.ICreate" - }, - "title": "List of journeys of the delivery", - "description": "List of journeys of the delivery.\n\nThis is initial data, and it is also possible to accumulate journey data\nafter the delivery creation." + ] }, - "shippers": { + "cancel_history": { "type": "array", "items": { - "$ref": "#/components/schemas/IShoppingDeliveryShipper.ICreate" - }, - "title": "List of shippers of the delivery", - "description": "List of shippers of the delivery." - } - }, - "required": [ - "pieces", - "journeys", - "shippers" - ], - "description": "Creation information of the delivery." - }, - "IShoppingDeliveryPiece.ICreate": { - "type": "object", - "properties": { - "publish_id": { - "type": "string", - "format": "uuid", - "title": "Target order's {@link IShoppingOrderPublish.id}", - "description": "Target order's {@link IShoppingOrderPublish.id}." - }, - "good_id": { - "type": "string", - "format": "uuid", - "title": "Target good's {@link IShoppingOrderGood.id}", - "description": "Target good's {@link IShoppingOrderGood.id}." - }, - "stock_id": { - "type": "string", - "format": "uuid", - "title": "Target stock's {@link IShoppingSaleUnitStock.id}", - "description": "Target stock's {@link IShoppingSaleUnitStock.id}." - }, - "quantity": { - "type": "number", - "minimum": 0, - "title": "Quantity of the stock", - "description": "Quantity of the stock.\n\nIt can be precision value to express splitted shipping." + "$ref": "#/components/schemas/IIamportPaymentCancel" + } } }, "required": [ - "publish_id", - "good_id", - "stock_id", - "quantity" + "vbank_code", + "vbank_name", + "vbank_num", + "vbank_holder", + "vbank_date", + "vbank_issued_at", + "pay_method", + "imp_uid", + "merchant_uid", + "name", + "amount", + "cancel_amount", + "currency", + "receipt_url", + "cash_receipt_issue", + "channel", + "pg_provider", + "emb_pg_provider", + "pg_id", + "pg_tid", + "escrow", + "buyer_name", + "buyer_email", + "buyer_tel", + "buyer_addr", + "buyer_postcode", + "customer_uid", + "customer_uid_usage", + "custom_data", + "user_agent", + "status", + "started_at", + "paid_at", + "failed_at", + "cancelled_at", + "fail_reason", + "cancel_reason", + "cancel_history" ], - "description": "Creation information of the delivery piece." + "description": "가상 계좌 결제 정보." }, - "IShoppingDeliveryJourney.ICreate": { + "IIamportPayment.IBasephonekpaykakaopaypaycolpayssgpaytosspayculturelandsmartculturehappymoneybooknlifepoint": { "type": "object", "properties": { - "type": { + "pay_method": { "oneOf": [ { - "const": "preparing" + "const": "phone" + }, + { + "const": "kpay" + }, + { + "const": "kakaopay" + }, + { + "const": "payco" + }, + { + "const": "lpay" + }, + { + "const": "ssgpay" + }, + { + "const": "tosspay" + }, + { + "const": "cultureland" + }, + { + "const": "smartculture" }, { - "const": "manufacturing" + "const": "happymoney" }, { - "const": "shipping" + "const": "booknlife" }, { - "const": "delivering" + "const": "point" } - ], - "title": "Type of journey", - "description": "Type of journey.\n\n- preparing\n- manufacturing\n- shipping\n- delivering" + ] + }, + "imp_uid": { + "type": "string", + "title": "결제 정보 {@link IIamportPayment} 의 식별자 키", + "description": "결제 정보 {@link IIamportPayment} 의 식별자 키." + }, + "merchant_uid": { + "type": "string", + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." }, - "title": { + "name": { "oneOf": [ { "type": "null" @@ -16846,10 +2512,42 @@ "type": "string" } ], - "title": "Title of journey", - "description": "Title of journey." + "title": "주문명, 누락 가능", + "description": "주문명, 누락 가능." + }, + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." + }, + "cancel_amount": { + "type": "number", + "title": "결제 취소, 환불 총액", + "description": "결제 취소, 환불 총액." + }, + "currency": { + "$ref": "#/components/schemas/IIamportPayment.Currency", + "title": "통화 단위", + "description": "통화 단위." + }, + "receipt_url": { + "type": "string", + "format": "uri", + "title": "영수증 URL", + "description": "영수증 URL." + }, + "cash_receipt_issue": { + "type": "boolean", + "title": "현금 영수증 발행 여부", + "description": "현금 영수증 발행 여부." + }, + "channel": { + "type": "string" + }, + "pg_provider": { + "type": "string" }, - "description": { + "emb_pg_provider": { "oneOf": [ { "type": "null" @@ -16857,50 +2555,39 @@ { "type": "string" } - ], - "title": "Description of journey", - "description": "Description of journey." + ] }, - "started_at": { + "pg_id": { + "type": "string" + }, + "pg_tid": { + "type": "string" + }, + "escrow": { + "type": "boolean" + }, + "buyer_name": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } - ], - "title": "Start time of the journey", - "description": "Start time of the journey." + ] }, - "completed_at": { + "buyer_email": { "oneOf": [ { "type": "null" }, { "type": "string", - "format": "date-time" + "format": "email" } - ], - "title": "Completion time of the journey", - "description": "Completion time of the journey." - } - }, - "required": [ - "type", - "title", - "description", - "started_at", - "completed_at" - ], - "description": "Creation information of the delivery journey." - }, - "IShoppingDeliveryShipper.ICreate": { - "type": "object", - "properties": { - "company": { + ] + }, + "buyer_tel": { "oneOf": [ { "type": "null" @@ -16910,604 +2597,588 @@ } ] }, - "name": { - "type": "string" + "buyer_addr": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "mobile": { - "type": "string" - } - }, - "required": [ - "company", - "name", - "mobile" - ] - }, - "IShoppingDeliveryPiece.IRequest": { - "type": "object", - "properties": { - "publish_ids": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - }, - "required": [ - "publish_ids" - ] - }, - "IShoppingDeliveryJourney.IComplete": { - "type": "object", - "properties": { - "completed_at": { + "buyer_postcode": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } - ], - "title": "Completion time of the journey", - "description": "Completion time of the journey." - } - }, - "required": [ - "completed_at" - ], - "description": "Completion information of the delivery journey." - }, - "IShoppingSale.ICreate": { - "type": "object", - "properties": { - "section_code": { - "type": "string", - "title": "Belonged section's {@link IShoppingSection.code}", - "description": "Belonged section's {@link IShoppingSection.code}." + ] }, - "status": { + "customer_uid": { "oneOf": [ { "type": "null" }, { - "const": "paused" + "type": "string" + } + ] + }, + "customer_uid_usage": { + "oneOf": [ + { + "type": "null" }, { - "const": "suspended" + "type": "string" } - ], - "title": "Initial status of the sale", - "description": "Initial status of the sale.\n\n`null` or `undefined`: No restriction\n`paused`: Starts with {@link ITimestamps.paused_at paused} status\n`suspended`: Starts with {@link ITimestamps.suspended_at suspended} status" + ] }, - "opened_at": { + "custom_data": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } - ], - "title": "Opening time of the sale", - "description": "Opening time of the sale." + ] }, - "closed_at": { + "user_agent": { "oneOf": [ { "type": "null" }, { - "type": "string", - "format": "date-time" + "type": "string" } - ], - "title": "Closing time of the sale", - "description": "Closing time of the sale.\n\nIf this value is `null`, the sale be continued forever." + ] }, - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent.ICreate" + "status": { + "$ref": "#/components/schemas/IIamportPayment.Status", + "title": "결제의 현재 (진행) 상태", + "description": "결제의 현재 (진행) 상태." }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel.ICreate" - } + "started_at": { + "type": "number", + "title": "결제 신청 일시", + "description": "결제 신청 일시.\n\n리눅스 타임이 쓰임." }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit.ICreate" - }, - "minItems": 1 + "paid_at": { + "type": "number", + "title": "결제 (지불) 완료 일시", + "description": "결제 (지불) 완료 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "failed_at": { + "type": "number", + "title": "결제 실패 일시", + "description": "결제 실패 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "cancelled_at": { + "type": "number", + "title": "결제 취소 일시", + "description": "결제 취소 일시.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." + }, + "fail_reason": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] + }, + "cancel_reason": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string" + } + ] }, - "tags": { + "cancel_history": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/IIamportPaymentCancel" } } }, "required": [ - "section_code", - "opened_at", - "closed_at", - "content", - "channels", - "units", - "tags" + "pay_method", + "imp_uid", + "merchant_uid", + "name", + "amount", + "cancel_amount", + "currency", + "receipt_url", + "cash_receipt_issue", + "channel", + "pg_provider", + "emb_pg_provider", + "pg_id", + "pg_tid", + "escrow", + "buyer_name", + "buyer_email", + "buyer_tel", + "buyer_addr", + "buyer_postcode", + "customer_uid", + "customer_uid_usage", + "custom_data", + "user_agent", + "status", + "started_at", + "paid_at", + "failed_at", + "cancelled_at", + "fail_reason", + "cancel_reason", + "cancel_history" ], - "description": "Creation information of sale." + "description": "결제 기본 (공통) 정보." }, - "IShoppingSaleContent.ICreate": { + "IIamportPaymentCancel.ICreate": { "type": "object", "properties": { - "title": { - "type": "string" + "imp_uid": { + "type": "string", + "title": "결제 정보 {@link IIamportPayment} 의 식별자 키", + "description": "결제 정보 {@link IIamportPayment} 의 식별자 키." + }, + "merchant_uid": { + "type": "string", + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." + }, + "amount": { + "type": "number", + "title": "취소 금액, 부분 취소도 가능하다", + "description": "취소 금액, 부분 취소도 가능하다.\n\n누락시 전액 취소." }, - "format": { + "checksum": { "oneOf": [ { - "const": "html" - }, - { - "const": "md" + "type": "null" }, { - "const": "txt" + "type": "number", + "minimum": 0 } - ] + ], + "title": "취소 트랜잭션 수행 전, 현재 시점의 취소 가능한 잔액", + "description": "취소 트랜잭션 수행 전, 현재 시점의 취소 가능한 잔액.\n\nAPI요청자가 기록하고 있는 취소가능 잔액과 아임포트가 기록하고 있는 취소가능 잔액이\n일치하는지 사전에 검증하고, 검증에 실패하면 트랜잭션을 수행하지 않는다.\n\n`null` 인 경우에는 검증 프로세스를 생략." }, - "body": { - "type": "string" + "reason": { + "type": "string", + "title": "취소 사유", + "description": "취소 사유." }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - } + "tax_free": { + "type": "number", + "title": "취소요청금액 중 면세금액", + "description": "취소요청금액 중 면세금액." }, - "thumbnails": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - } + "refund_holder": { + "type": "string", + "title": "환불계좌 예금주", + "description": "환불계좌 예금주." + }, + "refund_bank": { + "type": "string", + "title": "환불계좌 은행 코드", + "description": "환불계좌 은행 코드." + }, + "refund_account": { + "type": "string", + "title": "환불계좌 계좌번호", + "description": "환불계좌 계좌번호." + }, + "refund_tel": { + "type": "string", + "description": "환불계좌 예금주 연락처" } }, "required": [ - "title", - "format", - "body", - "files", - "thumbnails" - ] + "imp_uid", + "merchant_uid", + "checksum", + "reason" + ], + "description": "결제 취소 입력 정보." }, - "IShoppingSaleChannel.ICreate": { + "IIamportResponseIIamportReceipt": { "type": "object", "properties": { "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." + }, + "message": { "type": "string", - "title": "Target channel's {@link IShoppingChannel.code}", - "description": "Target channel's {@link IShoppingChannel.code}." + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." }, - "category_ids": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "title": "List of target categories' {@link IShoppingChannelCategory.id}s", - "description": "List of target categories' {@link IShoppingChannelCategory.id}s.\n\nIf empty, it means all categories of the channel is listing the sale." + "response": { + "$ref": "#/components/schemas/IIamportReceipt", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ "code", - "category_ids" + "message", + "response" ], - "description": "Creation information of the target channel (and categories) of sale to sell." + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingSaleUnit.ICreate": { + "IIamportReceipt": { "type": "object", "properties": { - "options": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/IShoppingSaleUnitDescriptiveOption.ICreate" - }, - { - "$ref": "#/components/schemas/IShoppingSaleUnitSelectableOption.ICreate" - } - ] - }, - "title": "List of options", - "description": "List of options." + "imp_uid": { + "type": "string", + "title": "귀속 결제의 {@link IIamportPayment.imp_uid}", + "description": "귀속 결제의 {@link IIamportPayment.imp_uid}." }, - "stocks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStock.ICreate" - }, - "minItems": 1, - "title": "List of final stocks", - "description": "List of final stocks." + "receipt_uid": { + "type": "string", + "title": "현금 영수증의 고유 식별자 ID", + "description": "현금 영수증의 고유 식별자 ID." }, - "name": { + "apply_num": { "type": "string", - "title": "Representative name of the unit", - "description": "Representative name of the unit." + "title": "승인 번호", + "description": "승인 번호." }, - "primary": { - "type": "boolean", - "title": "Whether the unit is primary or not", - "description": "Whether the unit is primary or not.\n\nJust a labeling value." + "type": { + "$ref": "#/components/schemas/IIamportReceipt.Type", + "title": "발행 타입 (대상)", + "description": "발행 타입 (대상)." }, - "required": { - "type": "boolean", - "title": "Whether the unit is required or not", - "description": "Whether the unit is required or not.\n\nWhen the unit is required, the customer must select the unit. If do not\nselect, customer can't buy it.\n\nFor example, if there's a sale \"Macbook Set\" and one of the unit is the\n\"Main Body\", is it possible to buy the \"Macbook Set\" without the\n\"Main Body\" unit? This property is for that case." + "amount": { + "type": "number", + "title": "결제 총액", + "description": "결제 총액." + }, + "vat": { + "type": "number", + "title": "부가세", + "description": "부가세." + }, + "receipt_url": { + "type": "string", + "format": "uri", + "title": "현금영수증 조회 URL", + "description": "현금영수증 조회 URL." + }, + "applied_at": { + "type": "number", + "title": "현금영수증 발행 시간", + "description": "현금영수증 발행 시간." + }, + "cancelled_at": { + "type": "number", + "title": "현금영수증 취소 시간", + "description": "현금영수증 취소 시간.\n\n리눅스 타임이 쓰이며, `null` 대신 0 을 씀." } }, "required": [ - "options", - "stocks", - "name", - "primary", - "required" + "imp_uid", + "receipt_uid", + "apply_num", + "type", + "amount", + "vat", + "receipt_url", + "applied_at", + "cancelled_at" + ], + "description": "현금 영수증 정보." + }, + "IIamportReceipt.Type": { + "oneOf": [ + { + "const": "person" + }, + { + "const": "company" + } ], - "description": "Creation information of sale unit." + "description": "현금영수증 발행 타입 (대상)." }, - "IShoppingSaleUnitDescriptiveOption.ICreate": { + "IIamportReceipt.ICreate": { "type": "object", "properties": { - "type": { + "imp_uid": { + "type": "string", + "title": "귀속 결제의 {@link IIamportPayment.imp_uid}", + "description": "귀속 결제의 {@link IIamportPayment.imp_uid}." + }, + "identifier": { + "type": "string", + "title": "현금영수증 발생대상 식별정보", + "description": "현금영수증 발생대상 식별정보.\n\n - 국세청현금영수증카드\n - 휴대폰번호\n - 주민등록번호\n - 사업자등록번호" + }, + "identifier_type": { "oneOf": [ { - "const": "string" + "const": "phone" + }, + { + "const": "person" }, { - "const": "number" + "const": "business" }, { - "const": "boolean" + "const": "taxcard" } ], - "title": "Type of descriptive option", - "description": "Type of descriptive option.\n\nWhich typed value should be written when purchasing." + "title": "현금영수증 발행대상 유형", + "description": "현금영수증 발행대상 유형.\n\n - person: 주민등록번호\n - business: 사업자등록번호\n - phone: 휴대폰번호\n - taxcard: 국세청현금영수증카드\n\n일부 PG 사의 경우 이 항목이 없어 된다는데, 어지간하면 그냥 쓰기 바람." }, - "name": { - "type": "string", - "title": "Readable name of the option", - "description": "Readable name of the option." - } - }, - "required": [ - "type", - "name" - ], - "description": "Creation information of the descriptive option." - }, - "IShoppingSaleUnitSelectableOption.ICreate": { - "type": "object", - "properties": { "type": { - "const": "select", - "title": "Discriminant for the type of selectable option", - "description": "Discriminant for the type of selectable option." + "oneOf": [ + { + "const": "person" + }, + { + "const": "company" + } + ], + "title": "현금영수증 발행 타입 (대상)", + "description": "현금영수증 발행 타입 (대상).\n\n누락시 person 이 사용됨." }, - "name": { + "buyer_name": { "type": "string", - "title": "Represents the name of the option", - "description": "Represents the name of the option." + "title": "구매자 이름", + "description": "구매자 이름.\n\n형금영수증 발행건 사후 추적을 위해 가급 입력하기 바람." }, - "variable": { - "type": "boolean", - "title": "Whether the option is variable or not", - "description": "Whether the option is variable or not.\n\nWhen type of current option is \"select\", this attribute means whether\nselecting different candidate value affects the final stock or not." + "buyer_email": { + "type": "string", + "title": "구매자 이메일", + "description": "구매자 이메일." }, - "candidates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitOptionCandidate.ICreate" - }, - "minItems": 1, - "title": "List of candidate values", - "description": "List of candidate values." - } - }, - "required": [ - "type", - "name", - "variable", - "candidates" - ], - "description": "Creation information of the selectable option." - }, - "IShoppingSaleUnitOptionCandidate.ICreate": { - "type": "object", - "properties": { - "name": { + "buyer_tel": { "type": "string", - "title": "Represents the name of the candidate value", - "description": "Represents the name of the candidate value." + "title": "구매자 전화번호", + "description": "구매자 전화번호.\n\n현금영수증 발행건 사후 추적을 위해 가급 입력하기 바람." + }, + "tax_free": { + "type": "number", + "title": "면세 금액", + "description": "면세 금액." } }, "required": [ - "name" + "imp_uid", + "identifier" ], - "description": "Creation information of the candidate value." + "description": "현금영수증 입력 정보." }, - "IShoppingSaleUnitStock.ICreate": { + "IIamportUser.IAccessor": { "type": "object", "properties": { - "name": { + "imp_key": { "type": "string", - "title": "Representative name of the stock", - "description": "Representative name of the stock." + "title": "API 키", + "description": "API 키." }, - "price": { - "$ref": "#/components/schemas/IShoppingPrice", - "title": "Price of the stock", - "description": "Price of the stock." - }, - "quantity": { - "type": "integer", - "minimum": 1, - "title": "Initial inventory quantity", - "description": "Initial inventory quantity." - }, - "choices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockChoice.ICreate" - }, - "title": "List of choices", - "description": "List of choices.\n\nWhich candidate values being chosen for each option." + "imp_secret": { + "type": "string", + "title": "Secret 키", + "description": "Secret 키." } }, "required": [ - "name", - "price", - "quantity", - "choices" + "imp_key", + "imp_secret" ], - "description": "Creation information of the stock." + "description": "아임포트에서 부여해 준 API 및 secret 키." }, - "IShoppingSaleUnitStockChoice.ICreate": { + "IIamportResponseIIamportUser": { "type": "object", "properties": { - "option_index": { - "type": "integer", - "description": "Target option's index number in\n{@link IShoppingSaleUnit.ICreate.options}." + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - "candidate_index": { - "type": "integer", - "description": "Target candidate's index number in\n{@link IShoppingSaleUnitSelectableOption.ICreate.candidates}." + "message": { + "type": "string", + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." + }, + "response": { + "$ref": "#/components/schemas/IIamportUser", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ - "option_index", - "candidate_index" + "code", + "message", + "response" ], - "description": "Creation information of stock choice." + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingSaleSnapshot.ICreate": { + "IIamportUser": { "type": "object", "properties": { - "content": { - "$ref": "#/components/schemas/IShoppingSaleContent.ICreate" - }, - "channels": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleChannel.ICreate" - } + "now": { + "type": "number", + "title": "토큰 발행 시간", + "description": "토큰 발행 시간." }, - "units": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnit.ICreate" - }, - "minItems": 1 + "expired_at": { + "type": "number", + "title": "토큰 만료 시간", + "description": "토큰 만료 시간.\n\n리눅스 타임이 기준이며, 이를 JS 에서 사용하려거든, 아래와 같이 변환해야 한다.\n\n```typescript\nnew Date(user.expired_at * 1_000);\n```" }, - "tags": { - "type": "array", - "items": { - "type": "string" - } + "access_token": { + "type": "string", + "title": "유저 인증 토큰", + "description": "유저 인증 토큰." } }, "required": [ - "content", - "channels", - "units", - "tags" + "now", + "expired_at", + "access_token" ], - "description": "Creation information of the snapshot." + "description": "아임포트 유저 인증 정보.\n\n아임포트는 고객사에게 API 및 secret 키 정보, {@link IIamportUser.IAccessor} 를 발급해준다.\n\n하지만 이를 곧장 아임포트의 유저 인증에 사용할 수는 없고, 해당 API 및 secret 키를 토대로 유저\n인증 토큰을 발급받아야 하는데, 이 유저 인증 토큰에는 하필이면 만로 시간이라는 게 존재한다.\n`IIamportUser` 는 바로 이러한 유저 인증 토큰 및 그것의 만료 시간을 형상화한 자료구조\n인터페이스이다.\n\n더하여 이처럼 만료 시간이 존재하는 아임포트의 유저 인증 토큰의 특성상, 이것의 만료 시간이\n초과되지 않도록 관리하는 것은 매우 힘든 일이다. 이에 `iamport-server-api` 에서는 아임포트\n유저 인증 토큰이 만료될 때마다 자동 갱신해주는, {@link IamportConnector} 클래스를 제공한다." }, - "IShoppingSale.IUpdateOpeningTime": { + "IIamportVBankPayment.ICreate": { "type": "object", "properties": { - "opened_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Opening time of the sale", - "description": "Opening time of the sale." + "merchant_uid": { + "type": "string", + "title": "주문 식별자 키", + "description": "주문 식별자 키.\n\n아임포트 서버가 아닌, 이를 사용하는 서비스가 자체적으로 발급하고 관리한다." }, - "closed_at": { - "oneOf": [ - { - "type": "null" - }, - { - "type": "string", - "format": "date-time" - } - ], - "title": "Closing time of the sale", - "description": "Closing time of the sale.\n\nIf this value is `null`, the sale be continued forever." - } - }, - "required": [ - "opened_at", - "closed_at" - ], - "description": "Update opening time information of sale." - }, - "IShoppingSaleInquiryAnswer.ISnapshot": { - "type": "object", - "properties": { - "id": { + "amount": { + "type": "number", + "title": "총액", + "description": "총액." + }, + "vbank_code": { "type": "string", - "title": "Primary Key", - "description": "Primary Key." + "title": "가상계좌 은행 코드", + "description": "가상계좌 은행 코드." + }, + "vbank_due": { + "type": "number", + "title": "가상계좌 입금기한, 유닉스 타임", + "description": "가상계좌 입금기한, 유닉스 타임." }, - "created_at": { + "vbank_holder": { "type": "string", - "format": "date-time", - "title": "Creation time of snapshot record", - "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + "title": "예금주", + "description": "예금주." + }, + "name": { + "type": "string" }, - "format": { - "$ref": "#/components/schemas/IBbsArticle.Format", - "title": "Format of body", - "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + "buyer_name": { + "type": "string" + }, + "buyer_email": { + "type": "string" + }, + "buyer_tel": { + "type": "string" + }, + "buyer_addr": { + "type": "string" + }, + "buyer_postcode": { + "type": "string" + }, + "pg": { + "type": "string" }, - "title": { + "notice_url": { "type": "string", - "title": "Title of article", - "description": "Title of article." + "title": "가상 계좌 입금 정보를 수신할 URL", + "description": "가상 계좌 입금 정보를 수신할 URL.\n\n누락시 기본 웹훅 URL 사용." }, - "body": { + "custom_data": { "type": "string", - "title": "Content body of article", - "description": "Content body of article." + "title": "커스텀 데이터, 자유롭게 사용 가능", + "description": "커스텀 데이터, 자유롭게 사용 가능." }, - "files": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IAttachmentFile.ICreate" - }, - "title": "List of attachment files", - "description": "List of attachment files." + "pg_api_key": { + "type": "string", + "title": "[이니시스 전용] 가맹점 콘솔에서 확인한 API 값", + "description": "[이니시스 전용] 가맹점 콘솔에서 확인한 API 값." } }, "required": [ - "id", - "created_at", - "format", - "title", - "body", - "files" - ] + "merchant_uid", + "amount", + "vbank_code", + "vbank_due", + "vbank_holder" + ], + "description": "가상 계좌 결제 입력 정보.\n\n가상 계좌를 임의 생성할 수 있다.\n\n단, 일부 PG 사 혹은 `fake-iamport-server` 만 가능.\n\n - 세틀뱅크\n - 나이스페이먼츠\n - KG이니시스" }, - "IShoppingSaleUnitStockSupplement.IRequest": { + "IIamportResponseIIamportVBankPayment": { "type": "object", "properties": { - "sort": { - "type": "array", - "items": { - "oneOf": [ - { - "const": "-created_at" - }, - { - "const": "+created_at" - } - ] - }, - "title": "Sortable columns", - "description": "Sortable columns." - }, - "page": { - "type": "integer", - "title": "Page number", - "description": "Page number." + "code": { + "type": "number", + "title": "에러 코드", + "description": "에러 코드.\n\n값이 0 이면 오류가 없다는 뜻." }, - "limit": { - "type": "integer", - "title": "Limitation of records per a page", - "description": "Limitation of records per a page." - } - }, - "description": "Request information of the stock supplement list." - }, - "IPageIShoppingSaleUnitStockSupplement": { - "type": "object", - "properties": { - "pagination": { - "$ref": "#/components/schemas/IPage.IPagination", - "title": "Page information", - "description": "Page information." + "message": { + "type": "string", + "title": "성공 또는 오류 메시지", + "description": "성공 또는 오류 메시지." }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/IShoppingSaleUnitStockSupplement" - }, - "title": "List of records", - "description": "List of records." + "response": { + "$ref": "#/components/schemas/IIamportVBankPayment", + "title": "응답 데이터, 사실상 본문", + "description": "응답 데이터, 사실상 본문." } }, "required": [ - "pagination", - "data" + "code", + "message", + "response" ], - "description": "A page.\n\nCollection of records with pagination indformation." + "description": "아임포트 고유의 응답 데이터." }, - "IShoppingSaleUnitStockSupplement": { + "IIamportVBankPayment.IUpdate": { "type": "object", "properties": { - "id": { + "imp_uid": { "type": "string", - "format": "uuid", - "title": "Primary Key", - "description": "Primary Key." + "title": "대상 결제 기록의 {@link IIamportPayment.imp_uid}", + "description": "대상 결제 기록의 {@link IIamportPayment.imp_uid}." }, - "value": { - "type": "integer", - "title": "Supplemented quantity", - "description": "Supplemented quantity." + "amount": { + "type": "number", + "title": "수정할 결제 금액", + "description": "수정할 결제 금액." }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Creation time of the record", - "description": "Creation time of the record.\n\nAnother words, the time when inventory of the stock being supplemented." - } - }, - "required": [ - "id", - "value", - "created_at" - ], - "description": "Supplementation of inventory quantity of stock.\n\nYou know what? If a {@link IShoppingSaleUnitStock stock} has been sold over\nits {@link IShoppingSaleUnitStock.ICreate.quantity initial inventory quantity},\nthe stock can't be sold anymore, because of out of stock. In that case, how the\n{@link IShoppingSeller} should do?\n\nWhen the sotck is sold out, seller can supplement the inventory record by\nregistering this `IShoppingSaleUnitStockSupplement` record. Right, this\n`IShoppingSaleUnitStockSupplement` is an entity that embodies the\nsupplementation of the inventory quantity of the belonged stock." - }, - "IShoppingSaleUnitStockSupplement.ICreate": { - "type": "object", - "properties": { - "value": { - "type": "integer", - "title": "Supplemented quantity", - "description": "Supplemented quantity." + "vbank_due": { + "type": "number", + "title": "수정할 가상계좌 입금 기한", + "description": "수정할 가상계좌 입금 기한." } }, "required": [ - "value" + "imp_uid" ], - "description": "Creation information of the supplement." + "description": "가상 계좌 결제의 수정 입력 정보.\n\n아직 입금되지 않은 가상계좌의 입금기한 또는 입금금액을 수정할 수 있다.\n\n다만, 세틀뱅크 혹은 `fake-iamport-server` 만 가능." } }, "securitySchemes": { @@ -17518,28 +3189,6 @@ } } }, - "tags": [ - { - "name": "Monitor" - }, - { - "name": "Authenticate" - }, - { - "name": "Discount" - }, - { - "name": "Order" - }, - { - "name": "Sale" - }, - { - "name": "Systematic" - }, - { - "name": "Section" - } - ], + "tags": [], "x-samchon-emended": true } \ No newline at end of file diff --git a/website/public/swaggers/shopping.json b/website/public/swaggers/shopping.json index 142e3bdb2..59ffce492 100644 --- a/website/public/swaggers/shopping.json +++ b/website/public/swaggers/shopping.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "0.4.0", + "version": "0.4.3", "title": "@samchon/shopping-backend", "description": "Backend for shopping", "license": { @@ -236,8 +236,8 @@ "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " Target coupon's {@link IShoppingCoupon.id}" } ], "responses": { @@ -259,8 +259,8 @@ "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " Target coupon's {@link IShoppingCoupon.id}" } ], "responses": { @@ -356,8 +356,8 @@ "type": "string", "format": "uuid" }, - "description": "Target deposit's ", - "required": true + "required": true, + "description": " Target deposit's {@link IShoppingDeposit.id}" } ], "responses": { @@ -387,8 +387,8 @@ "type": "string", "format": "uuid" }, - "description": "Target deposit's ", - "required": true + "required": true, + "description": " Target deposit's {@link IShoppingDeposit.id}" } ], "responses": { @@ -412,7 +412,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], @@ -509,8 +508,8 @@ "type": "string", "format": "uuid" }, - "description": "Target mileage's ", - "required": true + "required": true, + "description": " Target mileage's {@link IShoppingMileage.id}" } ], "responses": { @@ -540,8 +539,8 @@ "type": "string", "format": "uuid" }, - "description": "Target mileage's ", - "required": true + "required": true, + "description": " Target mileage's {@link IShoppingMileage.id}" } ], "responses": { @@ -565,7 +564,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], @@ -662,8 +660,8 @@ "type": "string", "format": "uuid" }, - "description": "Target history's ", - "required": true + "required": true, + "description": " Target history's {@link IShoppingMileageDonation.id}" } ], "responses": { @@ -728,8 +726,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "responses": { @@ -794,8 +792,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -827,8 +825,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -837,8 +835,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -879,8 +877,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -889,8 +887,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry's ", - "required": true + "required": true, + "description": " Target inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -933,8 +931,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -943,8 +941,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -953,8 +951,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "responses": { @@ -984,8 +982,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -994,8 +992,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -1004,8 +1002,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "requestBody": { @@ -1048,8 +1046,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -1092,8 +1090,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -1136,8 +1134,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -1146,8 +1144,8 @@ "type": "string", "format": "uuid" }, - "description": "Target question's ", - "required": true + "required": true, + "description": " Target question's {@link IShoppingSaleQuestion.id}" } ], "responses": { @@ -1179,8 +1177,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -1189,8 +1187,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -1231,8 +1229,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -1241,8 +1239,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry's ", - "required": true + "required": true, + "description": " Target inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -1285,8 +1283,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -1295,8 +1293,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -1305,8 +1303,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "responses": { @@ -1336,8 +1334,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -1346,8 +1344,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -1356,8 +1354,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "requestBody": { @@ -1400,8 +1398,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -1444,8 +1442,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -1488,8 +1486,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -1498,8 +1496,8 @@ "type": "string", "format": "uuid" }, - "description": "Target review's ", - "required": true + "required": true, + "description": " Target review's {@link IShoppingSaleReview.id}" } ], "responses": { @@ -1531,8 +1529,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "requestBody": { @@ -1575,8 +1573,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -1585,8 +1583,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id}" } ], "responses": { @@ -1618,8 +1616,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -1628,8 +1626,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id}" } ], "responses": { @@ -1660,8 +1658,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" } ], "requestBody": { @@ -1701,8 +1699,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" } ], "responses": { @@ -1736,8 +1734,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -1745,8 +1743,8 @@ "schema": { "type": "string" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "requestBody": { @@ -1779,8 +1777,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -1789,8 +1787,8 @@ "type": "string", "format": "uuid" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "responses": { @@ -1821,8 +1819,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" } ], "requestBody": { @@ -1857,8 +1855,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -1867,8 +1865,8 @@ "type": "string", "format": "uuid" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "responses": { @@ -1964,8 +1962,8 @@ "type": "string", "format": "uuid" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.code}" } ], "requestBody": { @@ -1999,8 +1997,8 @@ "type": "string", "format": "uuid" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.id}" } ], "responses": { @@ -2090,8 +2088,8 @@ "schema": { "type": "string" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.code}" } ], "responses": { @@ -2187,8 +2185,8 @@ "type": "string", "format": "uuid" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.code}" } ], "requestBody": { @@ -2222,8 +2220,8 @@ "type": "string", "format": "uuid" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.id}" } ], "responses": { @@ -2280,8 +2278,8 @@ "schema": { "type": "string" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.code}" } ], "responses": { @@ -2589,8 +2587,8 @@ "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " Target coupon's {@link IShoppingCoupon.id}" } ], "responses": { @@ -2686,8 +2684,8 @@ "type": "string", "format": "uuid" }, - "description": "Target coupon ticket's ", - "required": true + "required": true, + "description": " Target coupon ticket's {@link IShoppingCouponTicket.id}" } ], "responses": { @@ -2782,8 +2780,8 @@ "schema": { "type": "string" }, - "description": "Target deposit charge's ", - "required": true + "required": true, + "description": " Target deposit charge's {@link IShoppingDepositCharge.id}" } ], "responses": { @@ -2812,8 +2810,8 @@ "schema": { "type": "string" }, - "description": "Target deposit charge's ", - "required": true + "required": true, + "description": " Target deposit charge's {@link IShoppingDepositCharge.id}" } ], "requestBody": { @@ -2846,8 +2844,8 @@ "schema": { "type": "string" }, - "description": "Target deposit charge's ", - "required": true + "required": true, + "description": " Target deposit charge's {@link IShoppingDepositCharge.id}" } ], "responses": { @@ -2872,8 +2870,8 @@ "type": "string", "format": "uuid" }, - "description": "Target charge's ", - "required": true + "required": true, + "description": " Target charge's {@link IShoppingDepositCharge.id }" } ], "responses": { @@ -2905,8 +2903,8 @@ "type": "string", "format": "uuid" }, - "description": "Target charge's ", - "required": true + "required": true, + "description": " Target charge's {@link IShoppingDepositCharge.id }" } ], "requestBody": { @@ -2982,7 +2980,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], @@ -3070,8 +3067,8 @@ "type": "string", "format": "uuid" }, - "description": "Target mileage history's ", - "required": true + "required": true, + "description": " Target mileage history's {@link IShoppingMileageHistory.id}" } ], "responses": { @@ -3132,8 +3129,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" } ], "requestBody": { @@ -3181,8 +3178,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" } ], "requestBody": { @@ -3232,8 +3229,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" }, { "name": "id", @@ -3242,8 +3239,8 @@ "type": "string", "format": "uuid" }, - "description": "Target commodity's ", - "required": true + "required": true, + "description": " Target commodity's {@link IShoppingCartCommodity.id}" } ], "responses": { @@ -3280,8 +3277,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" }, { "name": "id", @@ -3290,8 +3287,8 @@ "type": "string", "format": "uuid" }, - "description": "Target commodity's ", - "required": true + "required": true, + "description": " Target commodity's {@link IShoppingCartCommodity.id}" } ], "requestBody": { @@ -3332,8 +3329,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" }, { "name": "id", @@ -3342,8 +3339,8 @@ "type": "string", "format": "uuid" }, - "description": "Target commodity's ", - "required": true + "required": true, + "description": " Target commodity's {@link IShoppingCartCommodity.id}" } ], "responses": { @@ -3375,8 +3372,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" }, { "name": "id", @@ -3385,8 +3382,8 @@ "type": "string", "format": "uuid" }, - "description": "Target commodity's ", - "required": true + "required": true, + "description": " Target commodity's {@link IShoppingCartCommodity.id}" } ], "responses": { @@ -3425,8 +3422,8 @@ } ] }, - "description": "Belonged cart's ID", - "required": true + "required": true, + "description": " Belonged cart's ID" } ], "requestBody": { @@ -3533,8 +3530,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "responses": { @@ -3557,8 +3554,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "responses": { @@ -3590,8 +3587,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "responses": { @@ -3623,8 +3620,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "requestBody": { @@ -3667,8 +3664,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "requestBody": { @@ -3711,8 +3708,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged order's ", - "required": true + "required": true, + "description": " Belonged order's {@link IShoppingOrder.id }" }, { "name": "id", @@ -3721,8 +3718,8 @@ "type": "string", "format": "uuid" }, - "description": "Target good's ", - "required": true + "required": true, + "description": " Target good's {@link IShoppingOrderGood.id }" } ], "responses": { @@ -3747,8 +3744,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id }" } ], "responses": { @@ -3780,8 +3777,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id }" } ], "requestBody": { @@ -3796,7 +3793,14 @@ { "$ref": "#/components/schemas/IShoppingOrderPublish.IZeroCreate" } - ] + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "cash": "#/components/schemas/IShoppingOrderPublish.ICashCreate", + "zero": "#/components/schemas/IShoppingOrderPublish.IZeroCreate" + } + } } } }, @@ -3829,8 +3833,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id }" } ], "responses": { @@ -3888,8 +3892,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -3921,8 +3925,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -3931,8 +3935,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -3973,8 +3977,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -3983,8 +3987,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry's ", - "required": true + "required": true, + "description": " Target inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -4027,8 +4031,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -4037,8 +4041,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -4047,8 +4051,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "responses": { @@ -4078,8 +4082,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -4088,8 +4092,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -4098,8 +4102,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "requestBody": { @@ -4142,8 +4146,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -4184,8 +4188,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -4228,8 +4232,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -4238,8 +4242,8 @@ "type": "string", "format": "uuid" }, - "description": "Target question's ", - "required": true + "required": true, + "description": " Target question's {@link IShoppingSaleQuestion.id}" } ], "requestBody": { @@ -4280,8 +4284,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -4290,8 +4294,8 @@ "type": "string", "format": "uuid" }, - "description": "Target question's ", - "required": true + "required": true, + "description": " Target question's {@link IShoppingSaleQuestion.id}" } ], "responses": { @@ -4323,8 +4327,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -4367,8 +4371,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -4377,8 +4381,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -4419,8 +4423,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -4429,8 +4433,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry's ", - "required": true + "required": true, + "description": " Target inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -4473,8 +4477,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -4483,8 +4487,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -4493,8 +4497,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "responses": { @@ -4524,8 +4528,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -4534,8 +4538,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -4544,8 +4548,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "requestBody": { @@ -4588,8 +4592,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -4630,8 +4634,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -4674,8 +4678,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -4684,8 +4688,8 @@ "type": "string", "format": "uuid" }, - "description": "Target review's ", - "required": true + "required": true, + "description": " Target review's {@link IShoppingSaleReview.id}" } ], "requestBody": { @@ -4726,8 +4730,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -4736,8 +4740,8 @@ "type": "string", "format": "uuid" }, - "description": "Target review's ", - "required": true + "required": true, + "description": " Target review's {@link IShoppingSaleReview.id}" } ], "responses": { @@ -4769,8 +4773,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -4813,8 +4817,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "requestBody": { @@ -4857,8 +4861,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -4867,8 +4871,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id}" } ], "responses": { @@ -4900,8 +4904,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -4910,8 +4914,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id}" } ], "responses": { @@ -4942,8 +4946,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" } ], "responses": { @@ -4977,8 +4981,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -4987,8 +4991,8 @@ "type": "string", "format": "uuid" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "responses": { @@ -5019,8 +5023,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -5029,8 +5033,8 @@ "type": "string", "format": "uuid" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "responses": { @@ -5128,8 +5132,8 @@ "type": "string", "format": "uuid" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.id}" } ], "responses": { @@ -5160,8 +5164,8 @@ "schema": { "type": "string" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.code}" } ], "responses": { @@ -5226,8 +5230,8 @@ "type": "string", "format": "uuid" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.id}" } ], "responses": { @@ -5258,8 +5262,8 @@ "schema": { "type": "string" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.code}" } ], "responses": { @@ -5441,8 +5445,8 @@ "type": "string", "format": "uuid" }, - "description": "Target delivery's ", - "required": true + "required": true, + "description": " Target delivery's {@link IShoppingDelivery.id}" } ], "responses": { @@ -5510,8 +5514,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged delivery's ", - "required": true + "required": true, + "description": " Belonged delivery's {@link IShoppingDelivery.id }" } ], "requestBody": { @@ -5554,8 +5558,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged delivery's ", - "required": true + "required": true, + "description": " Belonged delivery's {@link IShoppingDelivery.id }" }, { "name": "id", @@ -5564,8 +5568,8 @@ "type": "string", "format": "uuid" }, - "description": "Target journey's ", - "required": true + "required": true, + "description": " Target journey's {@link IShoppingDeliveryJourney.id}" } ], "requestBody": { @@ -5601,8 +5605,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged delivery's ", - "required": true + "required": true, + "description": " Belonged delivery's {@link IShoppingDelivery.id }" }, { "name": "id", @@ -5611,8 +5615,8 @@ "type": "string", "format": "uuid" }, - "description": "Target journey's ", - "required": true + "required": true, + "description": " Target journey's {@link IShoppingDeliveryJourney.id}" } ], "responses": { @@ -5637,8 +5641,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged delivery's ", - "required": true + "required": true, + "description": " Belonged delivery's {@link IShoppingDelivery.id }" } ], "requestBody": { @@ -5744,8 +5748,8 @@ "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " Target coupon's {@link IShoppingCoupon.id}" } ], "responses": { @@ -5767,8 +5771,8 @@ "schema": { "type": "string" }, - "description": "Target coupon's ", - "required": true + "required": true, + "description": " Target coupon's {@link IShoppingCoupon.id}" } ], "responses": { @@ -5833,8 +5837,8 @@ "type": "string", "format": "uuid" }, - "description": "Target order's ", - "required": true + "required": true, + "description": " Target order's {@link IShoppingOrder.id}" } ], "responses": { @@ -5930,8 +5934,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "requestBody": { @@ -5972,8 +5976,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -6005,8 +6009,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "requestBody": { @@ -6042,8 +6046,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -6075,8 +6079,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -6101,8 +6105,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -6127,8 +6131,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "responses": { @@ -6152,8 +6156,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "questionId", @@ -6162,8 +6166,8 @@ "type": "string", "format": "uuid" }, - "description": "Target question's ", - "required": true + "required": true, + "description": " Target question's {@link IShoppingSaleQuestion.id }" } ], "requestBody": { @@ -6204,8 +6208,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "questionId", @@ -6214,8 +6218,8 @@ "type": "string", "format": "uuid" }, - "description": "Target question's ", - "required": true + "required": true, + "description": " Target question's {@link IShoppingSaleQuestion.id }" } ], "requestBody": { @@ -6258,8 +6262,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6268,8 +6272,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -6310,8 +6314,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6320,8 +6324,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry's ", - "required": true + "required": true, + "description": " Target inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -6364,8 +6368,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6374,8 +6378,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -6384,8 +6388,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "responses": { @@ -6415,8 +6419,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6425,8 +6429,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -6435,8 +6439,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "requestBody": { @@ -6479,8 +6483,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -6523,8 +6527,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -6567,8 +6571,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -6577,8 +6581,8 @@ "type": "string", "format": "uuid" }, - "description": "Target question's ", - "required": true + "required": true, + "description": " Target question's {@link IShoppingSaleQuestion.id}" } ], "responses": { @@ -6610,8 +6614,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "reviewId", @@ -6620,8 +6624,8 @@ "type": "string", "format": "uuid" }, - "description": "Target review's ", - "required": true + "required": true, + "description": " Target review's {@link IShoppingSaleReview.id }" } ], "requestBody": { @@ -6662,8 +6666,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "reviewId", @@ -6672,8 +6676,8 @@ "type": "string", "format": "uuid" }, - "description": "Target review's ", - "required": true + "required": true, + "description": " Target review's {@link IShoppingSaleReview.id }" } ], "requestBody": { @@ -6716,8 +6720,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6726,8 +6730,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -6768,8 +6772,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6778,8 +6782,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry's ", - "required": true + "required": true, + "description": " Target inquiry's {@link IShoppingSaleInquiry.id }" } ], "requestBody": { @@ -6822,8 +6826,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6832,8 +6836,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -6842,8 +6846,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "responses": { @@ -6873,8 +6877,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "inquiryId", @@ -6883,8 +6887,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged inquiry's ", - "required": true + "required": true, + "description": " Belonged inquiry's {@link IShoppingSaleInquiry.id }" }, { "name": "id", @@ -6893,8 +6897,8 @@ "type": "string", "format": "uuid" }, - "description": "Target inquiry comment's ", - "required": true + "required": true, + "description": " Target inquiry comment's {@link IShoppingSaleInquiryComment.id}" } ], "requestBody": { @@ -6937,8 +6941,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -6981,8 +6985,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" } ], "requestBody": { @@ -7025,8 +7029,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "id", @@ -7035,8 +7039,8 @@ "type": "string", "format": "uuid" }, - "description": "Target review's ", - "required": true + "required": true, + "description": " Target review's {@link IShoppingSaleReview.id}" } ], "responses": { @@ -7068,8 +7072,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -7078,8 +7082,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id }" } ], "responses": { @@ -7111,8 +7115,8 @@ "type": "string", "format": "uuid" }, - "description": "Target sale's ", - "required": true + "required": true, + "description": " Target sale's {@link IShoppingSale.id}" } ], "requestBody": { @@ -7155,8 +7159,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -7165,8 +7169,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id}" } ], "responses": { @@ -7198,8 +7202,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id}" }, { "name": "id", @@ -7208,8 +7212,8 @@ "type": "string", "format": "uuid" }, - "description": "Target snapshot's ", - "required": true + "required": true, + "description": " Target snapshot's {@link IShoppingSaleSnapshot.id}" } ], "responses": { @@ -7241,8 +7245,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "unitId", @@ -7251,8 +7255,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged unit's ", - "required": true + "required": true, + "description": " Belonged unit's {@link IShoppingSaleUnit.id }" }, { "name": "stockId", @@ -7261,8 +7265,8 @@ "type": "string", "format": "uuid" }, - "description": "Target stock's ", - "required": true + "required": true, + "description": " Target stock's {@link IShoppingSaleUnitStock.id }" } ], "requestBody": { @@ -7303,8 +7307,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "unitId", @@ -7313,8 +7317,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged unit's ", - "required": true + "required": true, + "description": " Belonged unit's {@link IShoppingSaleUnit.id }" }, { "name": "stockId", @@ -7323,8 +7327,8 @@ "type": "string", "format": "uuid" }, - "description": "Target stock's ", - "required": true + "required": true, + "description": " Target stock's {@link IShoppingSaleUnitStock.id }" } ], "requestBody": { @@ -7367,8 +7371,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "unitId", @@ -7377,8 +7381,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged unit's ", - "required": true + "required": true, + "description": " Belonged unit's {@link IShoppingSaleUnit.id }" }, { "name": "stockId", @@ -7387,8 +7391,8 @@ "type": "string", "format": "uuid" }, - "description": "Target stock's ", - "required": true + "required": true, + "description": " Target stock's {@link IShoppingSaleUnitStock.id }" }, { "name": "id", @@ -7397,8 +7401,8 @@ "type": "string", "format": "uuid" }, - "description": "Target supplement's ", - "required": true + "required": true, + "description": " Target supplement's {@link IShoppingSaleUnitStockSupplement.id}" } ], "requestBody": { @@ -7432,8 +7436,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged sale's ", - "required": true + "required": true, + "description": " Belonged sale's {@link IShoppingSale.id }" }, { "name": "unitId", @@ -7442,8 +7446,8 @@ "type": "string", "format": "uuid" }, - "description": "Belonged unit's ", - "required": true + "required": true, + "description": " Belonged unit's {@link IShoppingSaleUnit.id }" }, { "name": "stockId", @@ -7452,8 +7456,8 @@ "type": "string", "format": "uuid" }, - "description": "Target stock's ", - "required": true + "required": true, + "description": " Target stock's {@link IShoppingSaleUnitStock.id }" }, { "name": "id", @@ -7462,8 +7466,8 @@ "type": "string", "format": "uuid" }, - "description": "Target supplement's ", - "required": true + "required": true, + "description": " Target supplement's {@link IShoppingSaleUnitStockSupplement.id}" } ], "responses": { @@ -7487,8 +7491,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" } ], "responses": { @@ -7522,8 +7526,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -7532,8 +7536,8 @@ "type": "string", "format": "uuid" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "responses": { @@ -7564,8 +7568,8 @@ "schema": { "type": "string" }, - "description": "Belonged channel's ", - "required": true + "required": true, + "description": " Belonged channel's {@link IShoppingChannel.code }" }, { "name": "id", @@ -7574,8 +7578,8 @@ "type": "string", "format": "uuid" }, - "description": "Target category's ", - "required": true + "required": true, + "description": " Target category's {@link IShoppingChannelCategory.id}" } ], "responses": { @@ -7673,8 +7677,8 @@ "type": "string", "format": "uuid" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.id}" } ], "responses": { @@ -7705,8 +7709,8 @@ "schema": { "type": "string" }, - "description": "Target channel's ", - "required": true + "required": true, + "description": " Target channel's {@link IShoppingChannel.code}" } ], "responses": { @@ -7771,8 +7775,8 @@ "type": "string", "format": "uuid" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.id}" } ], "responses": { @@ -7803,8 +7807,8 @@ "schema": { "type": "string" }, - "description": "Target section's ", - "required": true + "required": true, + "description": " Target section's {@link IShoppingSection.code}" } ], "responses": { @@ -8532,6 +8536,13 @@ "$ref": "#/components/schemas/IShoppingCouponDiscount.IPercent" } ], + "discriminator": { + "propertyName": "unit", + "mapping": { + "amount": "#/components/schemas/IShoppingCouponDiscount.IAmount", + "percent": "#/components/schemas/IShoppingCouponDiscount.IPercent" + } + }, "title": "Discount information", "description": "Discount information." }, @@ -8559,7 +8570,17 @@ { "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria.ICreate" } - ] + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "channel": "#/components/schemas/IShoppingCouponChannelCriteria.ICreate", + "section": "#/components/schemas/IShoppingCouponSectionCriteria.ICreate", + "seller": "#/components/schemas/IShoppingCouponSellerCriteria.ICreate", + "sale": "#/components/schemas/IShoppingCouponSaleCriteria.ICreate", + "funnel": "#/components/schemas/IShoppingCouponFunnelCriteria.ICreate" + } + } } }, "disposable_codes": { @@ -9247,6 +9268,16 @@ "$ref": "#/components/schemas/IShoppingCouponFunnelCriteria" } ], + "discriminator": { + "propertyName": "type", + "mapping": { + "channel": "#/components/schemas/IShoppingCouponChannelCriteria", + "section": "#/components/schemas/IShoppingCouponSectionCriteria", + "seller": "#/components/schemas/IShoppingCouponSellerCriteria", + "sale": "#/components/schemas/IShoppingCouponSaleCriteria", + "funnel": "#/components/schemas/IShoppingCouponFunnelCriteria" + } + }, "description": "Union type of the criteria.\n\n`IShoppingCouponCriteria` is an union typed structure that embodies the\nconditions for applying a {@link IShoppingCoupon discount coupon}. All\nof individual entities are imposing constraints on the reference unit of\na discount coupon were created by inheritig\n{@link IShoppingCouponCriteriaBase} type.\n\nAlso, individual entities can be specified by using the if condition on\nthe {@link type} property. For example, if the {@link type} value is\n`section`, {@link IShoppingCouponSectionCriteria} type would be specified,\nso that you can access to the target\n{@link IShoppingCouponSectionCriteria.section} directly. For reference,\nthis concept is called a descriminated union in TypeScript.\n\n```typescript\nconst union: IShoppingCouponCriteria;\nif (union.type === \"section\")\n union.section; // IShoppingCouponSectionCriteria.section\n```\n\nIn addition, constraints on reference units can be specified through the\n{@link direction} property to proceed as an inclusion condition or,\nconversely, as an exclusion condition. If the direction value is \"include\",\nthe coupon is applicable only to the reference object. Conversely, if the\ndirection value is \"exclude\", it is a coupon that cannot be applied to the\nreference object." }, "IShoppingCouponChannelCriteria": { @@ -9956,6 +9987,13 @@ "$ref": "#/components/schemas/IShoppingCouponDiscount.IPercent" } ], + "discriminator": { + "propertyName": "unit", + "mapping": { + "amount": "#/components/schemas/IShoppingCouponDiscount.IAmount", + "percent": "#/components/schemas/IShoppingCouponDiscount.IPercent" + } + }, "description": "Discount information of the coupon.\n\n`IShoppingCouponDiscount` is a type representing the discount information\nof a {@link IShoppingCoupon}. Also, it is an union type that divided\nby the {@link unit} of the discount value, `amount` or `percent`." }, "IShoppingCoupon.IRequest": { @@ -12853,12 +12891,20 @@ "$ref": "#/components/schemas/IShoppingAdministrator.IInvert" }, { - "$ref": "#/components/schemas/IShoppingSeller.IInvert" + "$ref": "#/components/schemas/IShoppingCustomer" }, { - "$ref": "#/components/schemas/IShoppingCustomer" + "$ref": "#/components/schemas/IShoppingSeller.IInvert" } - ] + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "administrator": "#/components/schemas/IShoppingAdministrator.IInvert", + "customer": "#/components/schemas/IShoppingCustomer", + "seller": "#/components/schemas/IShoppingSeller.IInvert" + } + } }, "IBbsArticleComment.ISnapshot": { "type": "object", diff --git a/website/public/swaggers/toss-payments.json b/website/public/swaggers/toss-payments.json index dd96594f4..97e4c829f 100644 --- a/website/public/swaggers/toss-payments.json +++ b/website/public/swaggers/toss-payments.json @@ -13,7 +13,7 @@ "info": { "title": "Toss Payments API", "description": "Built by [fake-toss-payments-server](https://github.com/samchon/payments/tree/master/packages/toss-payments-server-api) with [nestia](https://github.com/samchon/nestia)", - "version": "8.0.0-dev.20240413", + "version": "8.1.0", "license": { "name": "MIT" } @@ -65,8 +65,8 @@ "schema": { "type": "string" }, - "description": "대상 정보의 ", - "required": true + "required": true, + "description": " 대상 정보의 {@link ITossBilling.billingKey}" } ], "requestBody": { @@ -111,8 +111,8 @@ "schema": { "type": "string" }, - "description": "간편 결제에 등록한 수단의 ", - "required": true + "required": true, + "description": " 간편 결제에 등록한 수단의 {@link ITossBilling.billingKey}" } ], "requestBody": { @@ -139,7 +139,7 @@ } }, "summary": "간편 결제에 등록한 수단으로 결제하기", - "description": "간편 결제에 등록한 수단으로 결제하기.\n\n`billing.pay` 는 간편 결제에 등록한 수단으로 결제를 진행하고자 할 때 호출하는 API\n함수이다.\n\n그리고 `billing.pay` 는 결제 수단 중 유일하게, 클라이언트 어플리케이션이 토스\n페이먼츠가 제공하는 결제 창을 사용할 수 없어, 귀하의 백엔드 서버가 토스 페이먼츠의\nAPI 함수를 직접 호출해야 하는 경우에 해당한다. 따라서 간편 결제에 관련하여 토스\n페이먼츠와 연동하는 백엔드 서버 및 프론트 어플리케이션을 개발할 때, 반드시 이 상황에\n대한 별도의 설계 및 개발이 필요하니, 이 점을 염두에 두기 바란다.\n\n더하여 `billing.pay` 는 철저히 귀사 백엔드 서버의 판단 아래 호출되는 API 함수인지라,\n이를 통하여 이루어지는 결제는 일절 {@link payments.approve } 가 필요 없다. 다만\n`billing.pay` 는 이처럼 부차적인 승인 과정 필요없이 그 즉시로 결제가 완성되니, 이를\n호출하는 상황에 대하여 세심히 주의를 기울일 필요가 있다", + "description": "간편 결제에 등록한 수단으로 결제하기.\n\n`billing.pay` 는 간편 결제에 등록한 수단으로 결제를 진행하고자 할 때 호출하는 API\n함수이다.\n\n그리고 `billing.pay` 는 결제 수단 중 유일하게, 클라이언트 어플리케이션이 토스\n페이먼츠가 제공하는 결제 창을 사용할 수 없어, 귀하의 백엔드 서버가 토스 페이먼츠의\nAPI 함수를 직접 호출해야 하는 경우에 해당한다. 따라서 간편 결제에 관련하여 토스\n페이먼츠와 연동하는 백엔드 서버 및 프론트 어플리케이션을 개발할 때, 반드시 이 상황에\n대한 별도의 설계 및 개발이 필요하니, 이 점을 염두에 두기 바란다.\n\n더하여 `billing.pay` 는 철저히 귀사 백엔드 서버의 판단 아래 호출되는 API 함수인지라,\n이를 통하여 이루어지는 결제는 일절 {@link payments.approve} 가 필요 없다. 다만\n`billing.pay` 는 이처럼 부차적인 승인 과정 필요없이 그 즉시로 결제가 완성되니, 이를\n호출하는 상황에 대하여 세심히 주의를 기울일 필요가 있다", "security": [ { "basic": [] @@ -193,8 +193,8 @@ "schema": { "type": "string" }, - "description": "현금 영수증의 ", - "required": true + "required": true, + "description": " 현금 영수증의 {@link ITossCashReceipt.receiptKey}" } ], "requestBody": { @@ -250,7 +250,7 @@ } }, "summary": "웹훅 이벤트 더미 리스너", - "description": "웹훅 이벤트 더미 리스너.\n\n`internal.webhook` 은 실제 토스 페이먼츠의 결제 서버에는 존재하지 않는 API 로써,\n`fake-toss-payments-server` 의 {@link Configuration.WEBHOOK_URL } 에 아무런 URL 을\n설정하지 않으면, `fake-toss-payments-server` 로부터 발생하는 모든 종류의 웹훅\n이벤트는 이 곳으로 전달되어 무의미하게 사라진다.\n\n따라서 `fake-toss-payments-server` 를 사용하여 토스 페이먼츠 서버와의 연동을 미리\n검증코자 할 때는, 반드시 {@link Configuration.WEBHOOK_URL } 를 설정하여 웹훅\n이벤트가 귀하의 백엔드 서버로 제대로 전달되도록 하자." + "description": "웹훅 이벤트 더미 리스너.\n\n`internal.webhook` 은 실제 토스 페이먼츠의 결제 서버에는 존재하지 않는 API 로써,\n`fake-toss-payments-server` 의 {@link Configuration.WEBHOOK_URL} 에 아무런 URL 을\n설정하지 않으면, `fake-toss-payments-server` 로부터 발생하는 모든 종류의 웹훅\n이벤트는 이 곳으로 전달되어 무의미하게 사라진다.\n\n따라서 `fake-toss-payments-server` 를 사용하여 토스 페이먼츠 서버와의 연동을 미리\n검증코자 할 때는, 반드시 {@link Configuration.WEBHOOK_URL} 를 설정하여 웹훅\n이벤트가 귀하의 백엔드 서버로 제대로 전달되도록 하자." } }, "/internal/{paymentKey}/deposit": { @@ -263,8 +263,8 @@ "schema": { "type": "string" }, - "description": "대상 가상 계좌 결제 정보의 ", - "required": true + "required": true, + "description": " 대상 가상 계좌 결제 정보의 {@link ITossPayment.paymentKey}" } ], "responses": { @@ -298,8 +298,8 @@ "schema": { "type": "string" }, - "description": "결제 정보의 ", - "required": true + "required": true, + "description": " 결제 정보의 {@link ITossPayment.paymentKey}" } ], "responses": { @@ -315,7 +315,7 @@ } }, "summary": "결제 정보 조회하기", - "description": "결제 정보 조회하기.\n\n`payments.at` 은 결제 정보를 조회하는 함수이다.\n\n주로 클라이언트 어플리케이션이 토스 페이먼츠가 자체적으로 제공하는 결제 창을 사용하는\n경우, 그래서 프론트 어플리케이션이 귀하의 백엔드 서버에 `paymentKey` 등 극히 일부의\n식별자 정보만을 전달해주어, 상세 결제 정보가 필요할 때 사용한다.\n\n참고로 토스 페이먼츠는 다른 결제 PG 사들과 다르게, 클라이언트 어플리케이션에서 토스\n페이먼츠의 결제 창을 이용하여 진행한 결제가 바로 확정되는 것은 아니다. 귀사의 백엔드\n서버가 현재의 `payments.at` 을 통하여 해당 결제 정보를 확인하고, {@link approve } 를\n호출하여 직접 승인하기 전까지, 해당 결제는 확정되지 않으니, 이 점에 유의하기 바란다." + "description": "결제 정보 조회하기.\n\n`payments.at` 은 결제 정보를 조회하는 함수이다.\n\n주로 클라이언트 어플리케이션이 토스 페이먼츠가 자체적으로 제공하는 결제 창을 사용하는\n경우, 그래서 프론트 어플리케이션이 귀하의 백엔드 서버에 `paymentKey` 등 극히 일부의\n식별자 정보만을 전달해주어, 상세 결제 정보가 필요할 때 사용한다.\n\n참고로 토스 페이먼츠는 다른 결제 PG 사들과 다르게, 클라이언트 어플리케이션에서 토스\n페이먼츠의 결제 창을 이용하여 진행한 결제가 바로 확정되는 것은 아니다. 귀사의 백엔드\n서버가 현재의 `payments.at` 을 통하여 해당 결제 정보를 확인하고, {@link approve} 를\n호출하여 직접 승인하기 전까지, 해당 결제는 확정되지 않으니, 이 점에 유의하기 바란다." }, "post": { "tags": [], @@ -326,8 +326,8 @@ "schema": { "type": "string" }, - "description": "대상 결제의 ", - "required": true + "required": true, + "description": " 대상 결제의 {@link ITossPayment.paymentKey}" } ], "requestBody": { @@ -354,7 +354,7 @@ } }, "summary": "결제 승인하기", - "description": "결제 승인하기.\n\n토스 페이먼츠는 귀사의 백엔드에서 일어난 결제가 아닌 프론트 어플리케이션의 결제 창에서\n이루어진 결제의 경우, 해당 서비스으 백엔드 서버로부터 결제를 승인받기 전까지, 이를\n확정하지 않는다. `payments.approve` 는 바로 이러한 상황에서, 해당 결제를 승인해주는\n함수이다.\n\n만일 귀하가 `fake-toss-payments-server` 를 이용하여 결제를 시뮬레이션하는 경우라면,\n결제 관련 API 를 호출함에 있어 {@link ITossCardPayment.ICreate.__approved } 내지\n{@link ITossVirtualAccountPayment.ICreate.__approved } 를 `false` 로 함으로써, 별도\n승인이 필요한 이러한 상황을 시뮬레이션 할 수 있다.", + "description": "결제 승인하기.\n\n토스 페이먼츠는 귀사의 백엔드에서 일어난 결제가 아닌 프론트 어플리케이션의 결제 창에서\n이루어진 결제의 경우, 해당 서비스으 백엔드 서버로부터 결제를 승인받기 전까지, 이를\n확정하지 않는다. `payments.approve` 는 바로 이러한 상황에서, 해당 결제를 승인해주는\n함수이다.\n\n만일 귀하가 `fake-toss-payments-server` 를 이용하여 결제를 시뮬레이션하는 경우라면,\n결제 관련 API 를 호출함에 있어 {@link ITossCardPayment.ICreate.__approved} 내지\n{@link ITossVirtualAccountPayment.ICreate.__approved} 를 `false` 로 함으로써, 별도\n승인이 필요한 이러한 상황을 시뮬레이션 할 수 있다.", "security": [ { "basic": [] @@ -390,7 +390,7 @@ } }, "summary": "카드로 결제하기", - "description": "카드로 결제하기.\n\n`payments.key_in` 은 카드를 이용한 결제를 할 때 호출되는 API 함수이다.\n\n참고로 `payments.key_in` 는 클라이언트 어플리케이션이 토스 페이먼츠가 자체적으로\n제공하는 결제 창을 사용하는 경우, 귀하의 백엔드 서버가 이를 실 서비스에서 호출하는\n일은 없을 것이다. 다만, 고객이 카드를 통하여 결제하는 상황을 시뮬레이션하기 위하여,\n테스트 자동화 프로그램 수준에서 사용될 수는 있다.\n\n그리고 귀하의 백엔드 서버가 `payments.key-in` 을 직접 호출하는 경우, 토스 페이먼츠\n서버는 이를 완전히 승인된 결제로 보고 바로 확정한다. 때문에 `payments.key-in` 을\n직접 호출하는 경우, 토스 페이먼츠의 결제 창을 이용하여 별도의 {@link approve } 가\n필요한 때 대비, 훨씬 더 세심한 주의가 요구된다.\n\n더하여 만약 귀하의 백엔드 서버가 `fake-toss-payments-server` 를 이용하여 고객의\n카드 결제를 시뮬레이션하는 경우, {@link ITossCardPayment.ICreate.__approved } 값을\n`false` 로 하여 카드 결제의 확정을 고의로 회피할 수 있다. 이를 통하여 토스\n페이먼츠의 결제 창을 이용한 카드 결제의 경우, 별도의 {@link approve } 가 필요한\n상황을 시뮬레이션 할 수 있다.", + "description": "카드로 결제하기.\n\n`payments.key_in` 은 카드를 이용한 결제를 할 때 호출되는 API 함수이다.\n\n참고로 `payments.key_in` 는 클라이언트 어플리케이션이 토스 페이먼츠가 자체적으로\n제공하는 결제 창을 사용하는 경우, 귀하의 백엔드 서버가 이를 실 서비스에서 호출하는\n일은 없을 것이다. 다만, 고객이 카드를 통하여 결제하는 상황을 시뮬레이션하기 위하여,\n테스트 자동화 프로그램 수준에서 사용될 수는 있다.\n\n그리고 귀하의 백엔드 서버가 `payments.key-in` 을 직접 호출하는 경우, 토스 페이먼츠\n서버는 이를 완전히 승인된 결제로 보고 바로 확정한다. 때문에 `payments.key-in` 을\n직접 호출하는 경우, 토스 페이먼츠의 결제 창을 이용하여 별도의 {@link approve} 가\n필요한 때 대비, 훨씬 더 세심한 주의가 요구된다.\n\n더하여 만약 귀하의 백엔드 서버가 `fake-toss-payments-server` 를 이용하여 고객의\n카드 결제를 시뮬레이션하는 경우, {@link ITossCardPayment.ICreate.__approved} 값을\n`false` 로 하여 카드 결제의 확정을 고의로 회피할 수 있다. 이를 통하여 토스\n페이먼츠의 결제 창을 이용한 카드 결제의 경우, 별도의 {@link approve} 가 필요한\n상황을 시뮬레이션 할 수 있다.", "security": [ { "basic": [] @@ -408,8 +408,8 @@ "schema": { "type": "string" }, - "description": "결제 정보의 ", - "required": true + "required": true, + "description": " 결제 정보의 {@link ITossPayment.paymentKey}" } ], "requestBody": { @@ -436,7 +436,7 @@ } }, "summary": "결제 취소하기", - "description": "결제 취소하기.\n\n`payments.cancel` 은 결제를 취소하는 API 이다.\n\n결제 취소 입력 정보 {@link ITossPaymentCancel.ICreate } 에는 취소 사유를 비롯하여,\n고객에게 환불해 줄 금액과 부가세 및 필요시 환불 계좌 정보 등을 입력하게 되어있다.", + "description": "결제 취소하기.\n\n`payments.cancel` 은 결제를 취소하는 API 이다.\n\n결제 취소 입력 정보 {@link ITossPaymentCancel.ICreate} 에는 취소 사유를 비롯하여,\n고객에게 환불해 줄 금액과 부가세 및 필요시 환불 계좌 정보 등을 입력하게 되어있다.", "security": [ { "basic": [] @@ -472,7 +472,7 @@ } }, "summary": "가상 계좌로 결제 신청하기", - "description": "가상 계좌로 결제 신청하기.\n\n`virtual_accounts.create` 는 고객이 결제 수단을 가상 계좌로 선택하는 경우에 호출되는\nAPI 함수이다. 물론 고객이 이처럼 가상 계좌를 선택한 경우, 고객이 지정된 계좌에 돈을\n입금하기 전까지는 결제가 마무리된 것이 아니기에, {@link ITossPayment.status } 값은\n`WAITING_FOR_DEPOSIT` 이 된다.\n\n참고로 `virtual_accounts.create` 는 클라이언트 어플리케이션이 토스 페이먼츠가\n자체적으로 제공하는 결제 창을 사용하는 경우, 귀하의 백엔드 서버가 이를 실 서비스에서\n호출하는 일은 없을 것이다. 다만, 고객이 가상 계좌로 결제를 진행하는 상황을\n시뮬레이션하기 위하여, 테스트 자동화 프로그램 수준에서 사용될 수는 있다.\n\n그리고 `virtual_accounts.create` 이후에 고객이 지정된 계좌에 금액을 입금하거든, 토스\n페이먼츠 서버로부터 웹훅 이벤트가 발생되어 귀하의 백엔드 서버로 전송된다. 만약 연동\n대상 토스 페이먼츠 서버가 실제가 아닌 `fake-toss-payments-server` 라면,\n{@link internal.virtual_accounts.deposit } 를 호출하여, 고객이 가상 계좌에 입금하는\n상황을 시뮬레이션 할 수 있다.", + "description": "가상 계좌로 결제 신청하기.\n\n`virtual_accounts.create` 는 고객이 결제 수단을 가상 계좌로 선택하는 경우에 호출되는\nAPI 함수이다. 물론 고객이 이처럼 가상 계좌를 선택한 경우, 고객이 지정된 계좌에 돈을\n입금하기 전까지는 결제가 마무리된 것이 아니기에, {@link ITossPayment.status} 값은\n`WAITING_FOR_DEPOSIT` 이 된다.\n\n참고로 `virtual_accounts.create` 는 클라이언트 어플리케이션이 토스 페이먼츠가\n자체적으로 제공하는 결제 창을 사용하는 경우, 귀하의 백엔드 서버가 이를 실 서비스에서\n호출하는 일은 없을 것이다. 다만, 고객이 가상 계좌로 결제를 진행하는 상황을\n시뮬레이션하기 위하여, 테스트 자동화 프로그램 수준에서 사용될 수는 있다.\n\n그리고 `virtual_accounts.create` 이후에 고객이 지정된 계좌에 금액을 입금하거든, 토스\n페이먼츠 서버로부터 웹훅 이벤트가 발생되어 귀하의 백엔드 서버로 전송된다. 만약 연동\n대상 토스 페이먼츠 서버가 실제가 아닌 `fake-toss-payments-server` 라면,\n{@link internal.virtual_accounts.deposit} 를 호출하여, 고객이 가상 계좌에 입금하는\n상황을 시뮬레이션 할 수 있다.", "security": [ { "basic": [] @@ -579,8 +579,8 @@ }, "billingKey": { "type": "string", - "title": "{@link ITossBilling } 의 식별자 키", - "description": "{@link ITossBilling } 의 식별자 키." + "title": "{@link ITossBilling} 의 식별자 키", + "description": "{@link ITossBilling} 의 식별자 키." }, "method": { "const": "카드", @@ -645,8 +645,8 @@ }, "billingKey": { "type": "string", - "title": "{@link IPaymentStore } 의 식별자 키", - "description": "{@link IPaymentStore } 의 식별자 키." + "title": "{@link IPaymentStore} 의 식별자 키", + "description": "{@link IPaymentStore} 의 식별자 키." }, "orderId": { "type": "string", @@ -801,7 +801,7 @@ "transactionKey": { "type": "string", "title": "거래 건에 대한 고유한 키 값", - "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey } 와 달리, 이를 사용할 일은 없더라." + "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey} 와 달리, 이를 사용할 일은 없더라." }, "orderName": { "type": "string", @@ -1205,7 +1205,7 @@ "transactionKey": { "type": "string", "title": "거래 건에 대한 고유한 키 값", - "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey } 와 달리, 이를 사용할 일은 없더라." + "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey} 와 달리, 이를 사용할 일은 없더라." }, "orderName": { "type": "string", @@ -1423,7 +1423,7 @@ "transactionKey": { "type": "string", "title": "거래 건에 대한 고유한 키 값", - "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey } 와 달리, 이를 사용할 일은 없더라." + "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey} 와 달리, 이를 사용할 일은 없더라." }, "orderName": { "type": "string", @@ -1647,7 +1647,7 @@ "transactionKey": { "type": "string", "title": "거래 건에 대한 고유한 키 값", - "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey } 와 달리, 이를 사용할 일은 없더라." + "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey} 와 달리, 이를 사용할 일은 없더라." }, "orderName": { "type": "string", @@ -1870,7 +1870,7 @@ "transactionKey": { "type": "string", "title": "거래 건에 대한 고유한 키 값", - "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey } 와 달리, 이를 사용할 일은 없더라." + "description": "거래 건에 대한 고유한 키 값.\n\n{@link paymentKey} 와 달리, 이를 사용할 일은 없더라." }, "orderName": { "type": "string", @@ -2095,8 +2095,8 @@ }, "paymentKey": { "type": "string", - "title": "귀속 결제의 {@link ITossPayment.paymentKey }", - "description": "귀속 결제의 {@link ITossPayment.paymentKey }." + "title": "귀속 결제의 {@link ITossPayment.paymentKey}", + "description": "귀속 결제의 {@link ITossPayment.paymentKey}." }, "orderId": { "type": "string", @@ -2240,8 +2240,8 @@ "properties": { "paymentKey": { "type": "string", - "title": "{@link ITossPayment } 의 식별자 키", - "description": "{@link ITossPayment } 의 식별자 키." + "title": "{@link ITossPayment} 의 식별자 키", + "description": "{@link ITossPayment} 의 식별자 키." }, "orderId": { "type": "string", @@ -2410,8 +2410,8 @@ "properties": { "paymentKey": { "type": "string", - "title": "{@link ITossPayment } 의 식별자 키", - "description": "{@link ITossPayment } 의 식별자 키." + "title": "{@link ITossPayment} 의 식별자 키", + "description": "{@link ITossPayment} 의 식별자 키." }, "cancelReason": { "type": "string", @@ -2531,5 +2531,6 @@ } } }, - "tags": [] + "tags": [], + "x-samchon-emended": true } \ No newline at end of file From 0c7e85620c8775a5a5c58595c0413e8599d7bbc6 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 14 Jul 2024 03:57:40 +0900 Subject: [PATCH 029/204] Let CLI to setup `@nestia/benchmark` too. --- packages/cli/package.json | 6 +++--- packages/cli/src/NestiaSetupWizard.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index a5a097849..ac907801a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "nestia", - "version": "5.3.1", + "version": "5.4.0", "description": "Nestia CLI tool", "main": "bin/index.js", "bin": { @@ -36,8 +36,8 @@ "inquirer": "^8.2.5" }, "devDependencies": { - "@nestia/core": "^2.4.0", - "@nestia/sdk": "^2.4.0", + "@nestia/core": "^3.7.0", + "@nestia/sdk": "^3.7.0", "@types/inquirer": "^9.0.3", "@types/node": "^18.11.16", "rimraf": "^3.0.2", diff --git a/packages/cli/src/NestiaSetupWizard.ts b/packages/cli/src/NestiaSetupWizard.ts index 64f6144a8..6ffce52aa 100644 --- a/packages/cli/src/NestiaSetupWizard.ts +++ b/packages/cli/src/NestiaSetupWizard.ts @@ -18,6 +18,7 @@ export namespace NestiaSetupWizard { pack.install({ dev: false, modulo: "@nestia/e2e", version: "latest" }); pack.install({ dev: false, modulo: "@nestia/fetcher", version: "latest" }); pack.install({ dev: true, modulo: "@nestia/sdk", version: "latest" }); + pack.install({ dev: true, modulo: "@nestia/benchmark", version: "latest" }); pack.install({ dev: true, modulo: "nestia", version: "latest" }); pack.install({ dev: false, modulo: "typia" }); From bd9777c159972564c637d066ddc9f1239a226a22 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Sun, 14 Jul 2024 16:06:56 +0900 Subject: [PATCH 030/204] Update docs/index.mdx --- website/pages/docs/index.mdx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/website/pages/docs/index.mdx b/website/pages/docs/index.mdx index f26d7aa5b..ef4fbef9a 100644 --- a/website/pages/docs/index.mdx +++ b/website/pages/docs/index.mdx @@ -54,9 +54,8 @@ Nestia is a set of helper libraries for [NestJS](https://docs.nestjs.com), suppo - SDK library generator for clients - Mockup Simulator for client developers - Automatic E2E test functions generator - - `@nestia/e2e` - - Test program utilizing e2e test functions - - Benchmark program using e2e test functions + - `@nestia/e2e`: Test program utilizing e2e test functions + - `@nestia/benchmark`: Benchmark program using e2e test functions - `@nestia/migrate`: OpenAPI generator from Swagger to NestJS/SDK - `@nestia/editor`: Swagger-UI with Online TypeScript Editor - `nestia`: Just CLI (command line interface) tool From 4ff05abe518e97a4c2feeaa333e96529041a0f46 Mon Sep 17 00:00:00 2001 From: lafish Date: Mon, 15 Jul 2024 13:20:56 +0800 Subject: [PATCH 031/204] fix/docs: replace FastifyAdaptor with FastifyAdapter --- packages/sdk/assets/config/nestia.config.ts | 4 ++-- website/pages/docs/sdk/e2e.mdx | 12 +++++------ website/pages/docs/sdk/sdk.mdx | 24 ++++++++++----------- website/pages/docs/sdk/simulator.mdx | 10 ++++----- website/pages/docs/sdk/swagger.mdx | 12 +++++------ 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/sdk/assets/config/nestia.config.ts b/packages/sdk/assets/config/nestia.config.ts index 6602df966..dc7efd537 100644 --- a/packages/sdk/assets/config/nestia.config.ts +++ b/packages/sdk/assets/config/nestia.config.ts @@ -2,7 +2,7 @@ import { INestiaConfig } from "@nestia/sdk"; import { Module } from "@nestjs/common"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; export const NESTIA_CONFIG: INestiaConfig = { /** @@ -22,7 +22,7 @@ export const NESTIA_CONFIG: INestiaConfig = { }) class MyModule {} const app = await NestFactory.create(MyModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, diff --git a/website/pages/docs/sdk/e2e.mdx b/website/pages/docs/sdk/e2e.mdx index 4fecfa388..acaacabc5 100644 --- a/website/pages/docs/sdk/e2e.mdx +++ b/website/pages/docs/sdk/e2e.mdx @@ -6,14 +6,14 @@ import { Tabs, Tab } from 'nextra-theme-docs' ```typescript filename="nestia.config.ts" copy showLineNumbers {20} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -75,14 +75,14 @@ export const test_api_body_store = async ( ```typescript copy filename="nestia.config.ts" showLineNumbers {20} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -400,13 +400,13 @@ export default NESTIA_CONFIG; ```typescript copy filename="nestia.config.ts" showLineNumbers {8-16} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -import { FastifyAdaptor } from "@nestjs/platform-fastify"; +import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { - const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, diff --git a/website/pages/docs/sdk/sdk.mdx b/website/pages/docs/sdk/sdk.mdx index 7ebc81d11..57060f83e 100644 --- a/website/pages/docs/sdk/sdk.mdx +++ b/website/pages/docs/sdk/sdk.mdx @@ -8,14 +8,14 @@ import { Tabs, Tab } from 'nextra-theme-docs' ```typescript copy filename="nestia.config.ts" showLineNumbers import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -126,14 +126,14 @@ Isn't it look like much more convenient and safer than before when using [Swagge ```typescript copy filename="nestia.config.ts" showLineNumbers {8-17} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -451,13 +451,13 @@ export default NESTIA_CONFIG; ```typescript copy filename="nestia.config.ts" showLineNumbers {8-16} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -import { FastifyAdaptor } from "@nestjs/platform-fastify"; +import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { - const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -522,14 +522,14 @@ export default NESTIA_CONFIG; ```typescript copy filename="nestia.config.ts" showLineNumbers {19} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -660,14 +660,14 @@ In that case, it would better to remove the dependency by using this `clone` mod ```typescript copy filename="nestia.config.ts" showLineNumbers {19} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const config: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -1209,14 +1209,14 @@ export namespace login { ```typescript copy filename="nestia.config.ts" showLineNumbers {19} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, diff --git a/website/pages/docs/sdk/simulator.mdx b/website/pages/docs/sdk/simulator.mdx index 3eddb2ff0..01fd24a37 100644 --- a/website/pages/docs/sdk/simulator.mdx +++ b/website/pages/docs/sdk/simulator.mdx @@ -6,14 +6,14 @@ import { Tabs, Tab } from 'nextra-theme-docs' ```typescript copy filename="nestia.config.ts" showLineNumbers {19} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -147,14 +147,14 @@ Within framework of backend developers, they also do not need to be suffered fro ```typescript copy filename="nestia.config.ts" showLineNumbers {19} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -478,7 +478,7 @@ export default NESTIA_CONFIG; ```typescript copy filename="nestia.config.ts" showLineNumbers {8-16} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -import { FastifyAdaptor } from "@nestjs/platform-fastify"; +import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index ba225ba83..7b7f1baed 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -9,14 +9,14 @@ import { EDITOR_EXAMPLES } from "../../../src/constants/EDITOR_EXAMPLES"; ```typescript copy filename="nestia.config.ts" showLineNumbers import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -73,14 +73,14 @@ If you have a special configuration file that its file name is not `nestia.confi ```typescript copy filename="nestia.config.ts" showLineNumbers {18-35} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -// import { FastifyAdaptor } from "@nestjs/platform-fastify"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { const app = await NestFactory.create(YourModule); - // const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, @@ -498,13 +498,13 @@ export default NESTIA_CONFIG; ```typescript copy filename="nestia.config.ts" showLineNumbers {8-16} import { INestiaConfig } from "@nestia/sdk"; import { NestFactory } from "@nestjs/core"; -import { FastifyAdaptor } from "@nestjs/platform-fastify"; +import { FastifyAdapter } from "@nestjs/platform-fastify"; import { YourModule } from "./src/YourModule"; const NESTIA_CONFIG: INestiaConfig = { input: async () => { - const app = await NestFactory.create(YourModule, new FastifyAdaptor()); + const app = await NestFactory.create(YourModule, new FastifyAdapter()); // app.setGlobalPrefix("api"); // app.enableVersioning({ // type: VersioningType.URI, From 27cb78cceedc1a3bd6fca01df7e221207ea45a06 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 15 Jul 2024 18:33:40 +0900 Subject: [PATCH 032/204] Exact documentation of `@nestia/benchmark` --- packages/benchmark/package.json | 10 +++++----- packages/benchmark/src/DynamicBenchmarker.ts | 2 +- website/pages/docs/e2e/benchmark.mdx | 10 +++++----- website/pages/docs/e2e/why.mdx | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index bcc4804ad..265feecfd 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/benchmark", - "version": "0.1.1", + "version": "0.1.2", "description": "NestJS Performance Benchmark Program", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -22,14 +22,14 @@ "author": "Jeongho Nam", "license": "MIT", "devDependencies": { - "@nestia/core": "^3.6.1", + "@nestia/core": "^3.7.0", "@nestia/e2e": "^0.7.0", - "@nestia/sdk": "^3.6.1", + "@nestia/sdk": "^3.7.0", "@nestjs/common": "^10.3.10", "@nestjs/core": "^10.3.10", "@nestjs/platform-express": "^10.3.10", "@types/uuid": "^10.0.0", - "nestia": "^5.3.1", + "nestia": "^5.4.0", "ts-node": "^10.9.2", "ts-patch": "^3.2.1", "typescript": "^5.5.3", @@ -38,7 +38,7 @@ "uuid": "^10.0.0" }, "dependencies": { - "@nestia/fetcher": "^3.6.1", + "@nestia/fetcher": "^3.7.0", "tgrid": "^1.0.2", "tstl": "^3.0.0" }, diff --git a/packages/benchmark/src/DynamicBenchmarker.ts b/packages/benchmark/src/DynamicBenchmarker.ts index cfd97afe1..2b5ad6813 100644 --- a/packages/benchmark/src/DynamicBenchmarker.ts +++ b/packages/benchmark/src/DynamicBenchmarker.ts @@ -304,7 +304,7 @@ export namespace DynamicBenchmarker { ].join(" | "); return [ `# Benchmark Report`, - "> Generated by [`@nestia/e2e`](https://github.com/samchon/nestia)", + "> Generated by [`@nestia/benchmark`](https://github.com/samchon/nestia)", ``, ` - Specifications`, ` - CPU: ${os.cpus()[0].model}`, diff --git a/website/pages/docs/e2e/benchmark.mdx b/website/pages/docs/e2e/benchmark.mdx index 39e0171b5..523d5307c 100644 --- a/website/pages/docs/e2e/benchmark.mdx +++ b/website/pages/docs/e2e/benchmark.mdx @@ -3,9 +3,9 @@ import { Tabs, Tab } from 'nextra-theme-docs' ## Outline Benchmark your backend server with e2e test functions. -If you've developed e2e test functions utilizing [SDK library of `@nestia/sdk`](../sdk/sdk), you can re-use those e2e test functions in the benchmark program supported by `@nestia/e2e`. The benchmark program will run these e2e test functions in parellel and randomly to measure the performance of your backend server. +If you've developed e2e test functions utilizing [SDK library of `@nestia/sdk`](../sdk/sdk), you can re-use those e2e test functions in the benchmark program supported by `@nestia/benchmark`. The benchmark program will run these e2e test functions in parellel and randomly to measure the performance of your backend server. -If you want to pre-exprience the benchmark program utliizng the e2e test functions of `@nestia/sdk`, visit below playground website. Also, here is the benchmark report example generated by the benchmark program of `@nestia/e2e` executed in the below playgroud link. +If you want to pre-exprience the benchmark program utliizng the e2e test functions of `@nestia/sdk`, visit below playground website. Also, here is the benchmark report example generated by the benchmark program of `@nestia/benchmark` executed in the below playgroud link. > 💻 [https://stackblitz.com/~/github.com/samchon/nestia-start](https://stackblitz.com/~/github.com/samchon/nestia-start?file=README.md,docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md!,test/benchmark/index.ts,test/benchmark/servant.ts,test/features/api/bbs/test_api_bbs_article_create.ts&startScript=build:test,benchmark&view=editor) > @@ -28,7 +28,7 @@ If you want to pre-exprience the benchmark program utliizng the e2e test functio ]}> ```typescript filename="test/benchmark/index.ts" showLineNumbers {76-94} -import { DynamicBenchmarker } from "@nestia/e2e"; +import { DynamicBenchmarker } from "@nestia/benchmark"; import cliProgress from "cli-progress"; import fs from "fs"; import os from "os"; @@ -152,7 +152,7 @@ main().catch((exp) => { ```typescript filename="test/benchmark/servant.ts" showLineNumbers -import { DynamicBenchmarker } from "@nestia/e2e"; +import { DynamicBenchmarker } from "@nestia/benchmark"; import { MyConfiguration } from "../../src/MyConfiguration"; @@ -171,7 +171,7 @@ DynamicBenchmarker.servant({ -To compose the benchmark program of `@nestia/e2e` on your backend application, you have to create two executable TypeScript programs; the main program and the servant program. +To compose the benchmark program of `@nestia/benchmark` on your backend application, you have to create two executable TypeScript programs; the main program and the servant program. The main program is executed by user (`npm run benchmark` command in the playground project), and centralizes the benchmark progress. It creates multiple servant programs parallel, and aggregate the benchmark results from them. After the aggregation, it publishes the benchmark report with markdown format. diff --git a/website/pages/docs/e2e/why.mdx b/website/pages/docs/e2e/why.mdx index b34f772f7..2ba431519 100644 --- a/website/pages/docs/e2e/why.mdx +++ b/website/pages/docs/e2e/why.mdx @@ -5,7 +5,7 @@ E2E test functions rather than unit test functions. When developing a test program for NestJS developed backend server, I recommend to adapt E2E test paradigm instead of unit test paradigm. It's because with the [`@nestia/sdk` generated SDK library](../sdk/sdk), E2E test functions can be much easier, safer and efficient for production than the traditional unit test functions. -Furthermore, if you develop test functions utilizing the SDK library, you can easily switch the e2e test functions to the performance benchmark functions. Just by utilizing `@nestia/e2e` library, you can easily measure your NestJS developed backend server's performance through the SDK library utilizing e2e test functions. +Furthermore, if you develop test functions utilizing the SDK library, you can easily switch the e2e test functions to the performance benchmark functions. Just by utilizing `@nestia/e2e` nd `@nestia/benchmark` libraries, you can easily measure your NestJS developed backend server's performance through the SDK library utilizing e2e test functions. - [E2E Test Function Example](https://github.com/samchon/nestia-start/blob/master/test/features/api/bbs/test_api_bbs_article_create.ts) - [Benchmark Result Example](https://github.com/samchon/nestia-start/blob/master/docs/benchmarks/AMD%20Ryzen%209%207940HS%20w%20Radeon%20780M%20Graphics.md) @@ -429,7 +429,7 @@ If you want to experience the test program earlier, visit below playground websi selectedIndex={1}> ```typescript filename="test/benchmark/index.ts" showLineNumbers {76-94} -import { DynamicBenchmarker } from "@nestia/e2e"; +import { DynamicBenchmarker } from "@nestia/benchmark"; import cliProgress from "cli-progress"; import fs from "fs"; import os from "os"; @@ -553,7 +553,7 @@ main().catch((exp) => { ```typescript filename="test/benchmark/servant.ts" showLineNumbers -import { DynamicBenchmarker } from "@nestia/e2e"; +import { DynamicBenchmarker } from "@nestia/benchmark"; import { MyConfiguration } from "../../src/MyConfiguration"; From 68c814f5db3f9fa1c1c192fd4ab8f78a245904d8 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 17 Jul 2024 15:05:00 +0900 Subject: [PATCH 033/204] Add `MigrateFetcher.propagate()` function. To support 3rd party library utilizing `@nestia/migrate` for OpenAI LLM function calling purpose, I newly added `MigrateFetcher.propagate()` function. --- package.json | 2 +- packages/core/package.json | 6 +- packages/fetcher/package.json | 2 +- packages/fetcher/src/MigrateFetcher.ts | 41 ++++++++++++++ packages/sdk/package.json | 10 ++-- test/features/migrate/migrate.json | 56 +++++++++---------- .../features/api/test_api_bbs_article_at.ts | 9 +++ test/features/migrate/swagger.json | 2 +- .../api/automated/test_api_members_login.ts | 15 +++-- test/package.json | 8 +-- 10 files changed, 101 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 7277d76dc..0bf9031fc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.0", + "version": "3.7.1", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index a9a51af1f..615349c54 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.0", + "version": "3.7.1", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.0.tgz", + "@nestia/fetcher": "^3.7.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.4.1", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.0", + "@nestia/fetcher": ">=3.7.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index db14a6044..227f53125 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.0", + "version": "3.7.1", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/fetcher/src/MigrateFetcher.ts b/packages/fetcher/src/MigrateFetcher.ts index 1a5df51f5..6c52ac326 100644 --- a/packages/fetcher/src/MigrateFetcher.ts +++ b/packages/fetcher/src/MigrateFetcher.ts @@ -1,6 +1,7 @@ import { IMigrateRoute } from "@samchon/openapi"; import { IConnection } from "./IConnection"; +import { IPropagation } from "./IPropagation"; import { PlainFetcher } from "./PlainFetcher"; export namespace MigrateFetcher { @@ -48,6 +49,46 @@ export namespace MigrateFetcher { ); } + export async function propagate( + props: IProps, + ): Promise> { + const length: number = + props.route.parameters.length + + (props.route.query ? 1 : 0) + + (props.route.body ? 1 : 0); + if (props.arguments.length !== length) + throw new Error( + `Error on MigrateFetcher.propagate(): arguments length is not matched with the route (expected: ${length}, actual: ${props.arguments.length}).`, + ); + else if ( + props.route.body?.["x-nestia-encrypted"] === true || + props.route.success?.["x-nestia-encrypted"] === true + ) + throw new Error( + `Error on MigrateFetcher.propagate(): encrypted API is not supported yet.`, + ); + return PlainFetcher.propagate( + props.connection, + { + method: props.route.method.toUpperCase() as "POST", + path: getPath(props), + template: props.route.path, + status: null, + request: props.route.body + ? { + encrypted: false, + type: props.route.body.type, + } + : null, + response: { + encrypted: false, + type: props.route.success?.type ?? "application/json", + }, + }, + props.route.body ? props.arguments.at(-1) : undefined, + ) as Promise>; + } + function getPath(props: Pick): string { let path: string = props.route.emendedPath; props.route.parameters.forEach((p, i) => { diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 6868e59dd..bada1691f 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.0", + "version": "3.7.1", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.0.tgz", - "@nestia/core": "../core/nestia-core-3.7.0.tgz", + "@nestia/fetcher": "^3.7.1", + "@nestia/core": "^3.7.1", "@samchon/openapi": "^0.4.1", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.5.0" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.0", - "@nestia/core": ">=3.7.0", + "@nestia/fetcher": ">=3.7.1", + "@nestia/core": ">=3.7.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/test/features/migrate/migrate.json b/test/features/migrate/migrate.json index c7e47c5b5..e7cb08e44 100644 --- a/test/features/migrate/migrate.json +++ b/test/features/migrate/migrate.json @@ -9,8 +9,8 @@ "articles", "post" ], - "headers": null, "parameters": [], + "headers": null, "query": null, "body": { "type": "application/json", @@ -39,14 +39,14 @@ "articles", "patch" ], - "headers": null, "parameters": [], + "headers": null, "query": { - "name": "query", - "key": "query", "schema": { "$ref": "#/components/schemas/IApiBbsArticles.PatchQuery" - } + }, + "name": "query", + "key": "query" }, "body": null, "success": { @@ -68,18 +68,17 @@ "articles", "getById" ], - "headers": null, "parameters": [ { "name": "id", "key": "id", "schema": { "type": "string", - "format": "uuid", - "description": "" + "format": "uuid" } } ], + "headers": null, "query": null, "body": null, "success": { @@ -101,18 +100,17 @@ "articles", "putById" ], - "headers": null, "parameters": [ { "name": "id", "key": "id", "schema": { "type": "string", - "format": "uuid", - "description": "" + "format": "uuid" } } ], + "headers": null, "query": null, "body": { "type": "application/json", @@ -133,8 +131,8 @@ "multipart", "post" ], - "headers": null, "parameters": [], + "headers": null, "query": null, "body": { "type": "multipart/form-data", @@ -163,14 +161,14 @@ "typed", "get" ], - "headers": null, "parameters": [], + "headers": null, "query": { - "name": "query", - "key": "query", "schema": { "$ref": "#/components/schemas/IApiQueryTyped.GetQuery" - } + }, + "name": "query", + "key": "query" }, "body": null, "success": { @@ -192,14 +190,14 @@ "nest", "get" ], - "headers": null, "parameters": [], + "headers": null, "query": { - "name": "query", - "key": "query", "schema": { "$ref": "#/components/schemas/IApiQueryNest.GetQuery" - } + }, + "name": "query", + "key": "query" }, "body": null, "success": { @@ -221,14 +219,14 @@ "individual", "get" ], - "headers": null, "parameters": [], + "headers": null, "query": { - "name": "query", - "key": "query", "schema": { "$ref": "#/components/schemas/IApiQueryIndividual.GetQuery" - } + }, + "name": "query", + "key": "query" }, "body": null, "success": { @@ -250,14 +248,14 @@ "composite", "get" ], - "headers": null, "parameters": [], + "headers": null, "query": { - "name": "query", - "key": "query", "schema": { "$ref": "#/components/schemas/IApiQueryComposite.GetQuery" - } + }, + "name": "query", + "key": "query" }, "body": null, "success": { @@ -279,8 +277,8 @@ "body", "post" ], - "headers": null, "parameters": [], + "headers": null, "query": null, "body": { "type": "application/x-www-form-urlencoded", diff --git a/test/features/migrate/src/test/features/api/test_api_bbs_article_at.ts b/test/features/migrate/src/test/features/api/test_api_bbs_article_at.ts index 4690c321a..feb85c417 100644 --- a/test/features/migrate/src/test/features/api/test_api_bbs_article_at.ts +++ b/test/features/migrate/src/test/features/api/test_api_bbs_article_at.ts @@ -1,3 +1,4 @@ +import { IPropagation } from "@nestia/fetcher"; import { MigrateFetcher } from "@nestia/fetcher/lib/MigrateFetcher"; import typia from "typia"; import { v4 } from "uuid"; @@ -15,4 +16,12 @@ export const test_api_bbs_article_at = async ( arguments: [v4()], }); typia.assert(article); + + const propa: IPropagation.IBranch = + await MigrateFetcher.propagate({ + route: props.route("get", "/bbs/articles/{id}"), + connection: props.connection, + arguments: [v4()], + }); + typia.assert(propa); }; diff --git a/test/features/migrate/swagger.json b/test/features/migrate/swagger.json index ce1fc9986..271024088 100644 --- a/test/features/migrate/swagger.json +++ b/test/features/migrate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"description":"","required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.7.1","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts b/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts index b81b0e4a9..a095cf0a2 100644 --- a/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts +++ b/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts @@ -7,12 +7,15 @@ import type { IMember } from "../../../../api/structures/IMember"; import type { INotFound } from "../../../../api/structures/INotFound"; export const test_api_members_login = async (connection: api.IConnection) => { - const output: IPropagation<{ - 201: IMember; - 403: IForbidden; - 404: INotFound; - 422: IForbidden.IExpired; - }> = await api.functional.members.login( + const output: IPropagation< + { + 201: IMember; + 403: IForbidden; + 404: INotFound; + 422: IForbidden.IExpired; + }, + 201 + > = await api.functional.members.login( connection, typia.random(), ); diff --git a/test/package.json b/test/package.json index 39ed350e5..cdb1ed514 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.0", + "version": "3.7.1", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "../packages/sdk/nestia-sdk-3.7.0.tgz", + "@nestia/sdk": "^3.7.1", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.4.1", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "../packages/core/nestia-core-3.7.0.tgz", + "@nestia/core": "^3.7.1", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.7.0.tgz", + "@nestia/fetcher": "^3.7.1", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From c39bd7c7c39e67a2edddc87511fb50db467ab6a5 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 19 Jul 2024 04:43:26 +0900 Subject: [PATCH 034/204] Bump up `typia` version and make `Primitive` type to be compatible with it. --- benchmark/package.json | 2 +- package.json | 2 +- packages/benchmark/package.json | 2 +- packages/core/package.json | 12 ++++----- packages/e2e/package.json | 2 +- packages/fetcher/package.json | 4 +-- packages/fetcher/src/Primitive.ts | 26 ++++++++++++++++--- packages/fetcher/src/Resolved.ts | 1 + packages/migrate/package.json | 2 +- packages/sdk/package.json | 16 ++++++------ .../packages/api/package.json | 2 +- .../packages/api/package.json | 2 +- .../distribute-json/packages/api/package.json | 2 +- .../distribute/packages/api/package.json | 2 +- test/package.json | 12 ++++----- website/package.json | 2 +- 16 files changed, 55 insertions(+), 36 deletions(-) diff --git a/benchmark/package.json b/benchmark/package.json index 3d86d4c66..e93636491 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -42,7 +42,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/package.json b/package.json index 0bf9031fc..4587484fd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 265feecfd..55fd294af 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -34,7 +34,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.5.0", + "typia": "^6.5.2", "uuid": "^10.0.0" }, "dependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index 615349c54..5db409457 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,10 +36,10 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.1", + "@nestia/fetcher": "^3.7.2-dev.20240720", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", - "@samchon/openapi": "^0.4.1", + "@samchon/openapi": "^0.4.2", "detect-ts-node": "^1.0.5", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.5.0", + "typia": "^6.5.2", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.1", + "@nestia/fetcher": ">=3.7.2-dev.20240720", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.5.0 <7.0.0" + "typia": ">=6.5.2 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/e2e/package.json b/packages/e2e/package.json index dd29e5196..668f4a1e8 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -41,7 +41,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "files": [ "lib", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 227f53125..792671fcd 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -43,6 +43,6 @@ "src" ], "dependencies": { - "@samchon/openapi": "^0.4.1" + "@samchon/openapi": "^0.4.2" } } \ No newline at end of file diff --git a/packages/fetcher/src/Primitive.ts b/packages/fetcher/src/Primitive.ts index d3fc2ecf3..d63a4752e 100644 --- a/packages/fetcher/src/Primitive.ts +++ b/packages/fetcher/src/Primitive.ts @@ -47,15 +47,17 @@ type PrimitiveMain = Instance extends [never] ? never : ValueOf extends object ? Instance extends object - ? Instance extends NativeClass - ? never + ? Instance extends Date + ? string & FormatDateTime : Instance extends IJsonable ? ValueOf extends object ? Raw extends object ? PrimitiveObject // object would be primitified : never // cannot be : ValueOf // atomic value - : PrimitiveObject // object would be primitified + : Instance extends NativeClass + ? never + : PrimitiveObject // object would be primitified : never // cannot be : ValueOf; @@ -107,7 +109,10 @@ type NativeClass = | Float64Array | ArrayBuffer | SharedArrayBuffer - | DataView; + | DataView + | Blob + | File + | RegExp; type IsTuple = [T] extends [ never, @@ -134,3 +139,16 @@ interface IValueOf { interface IJsonable { toJSON(): T; } + +type FormatDateTime = { + "typia.tag"?: { + target: "string"; + kind: "format"; + value: "date-time"; + validate: `/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T|\\s)([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,9})?(Z|[+-]([01][0-9]|2[0-3]):[0-5][0-9])$/i.test($input)`; + exclusive: ["format", "pattern"]; + schema: { + format: "date-time"; + }; + }; +}; diff --git a/packages/fetcher/src/Resolved.ts b/packages/fetcher/src/Resolved.ts index c15627882..139cd85b2 100644 --- a/packages/fetcher/src/Resolved.ts +++ b/packages/fetcher/src/Resolved.ts @@ -70,6 +70,7 @@ type ResolvedObject = | DataView | Blob | File + | RegExp ? T : { [P in keyof T]: ResolvedMain; diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 3f96ef584..439d1a3b0 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -71,7 +71,7 @@ "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "files": [ "lib", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index bada1691f..98cf5e7ca 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,9 +32,9 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.1", - "@nestia/core": "^3.7.1", - "@samchon/openapi": "^0.4.1", + "@nestia/fetcher": "^3.7.2-dev.20240720", + "@nestia/core": "^3.7.2-dev.20240720", + "@samchon/openapi": "^0.4.2", "cli": "^1.0.1", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -44,16 +44,16 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.1", - "@nestia/core": ">=3.7.1", + "@nestia/fetcher": ">=3.7.2-dev.20240720", + "@nestia/core": ">=3.7.2-dev.20240720", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.5.0 <7.0.0" + "typia": ">=6.5.2 <7.0.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 1da929fb6..6487ac2c7 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -33,6 +33,6 @@ }, "dependencies": { "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.0" + "typia": "^6.5.2" } } \ No newline at end of file diff --git a/test/package.json b/test/package.json index cdb1ed514..ca595781b 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.1", + "version": "3.7.2-dev.20240720", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,9 +26,9 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.1", + "@nestia/sdk": "^3.7.2-dev.20240720", "@nestjs/swagger": "^7.1.2", - "@samchon/openapi": "^0.4.1", + "@samchon/openapi": "^0.4.2", "@types/express": "^4.17.17", "@types/node": "20.11.16", "@types/uuid": "^9.0.8", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.1", + "@nestia/core": "^3.7.2-dev.20240720", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.1", + "@nestia/fetcher": "^3.7.2-dev.20240720", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.5.0", + "typia": "^6.5.2", "uuid": "^9.0.1" } } \ No newline at end of file diff --git a/website/package.json b/website/package.json index 6eb8875e4..d66f32c42 100644 --- a/website/package.json +++ b/website/package.json @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", From 54e94fa57ccba4f9ef696040bc3940b0bb9c2080 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 19 Jul 2024 04:45:21 +0900 Subject: [PATCH 035/204] Prohibit `TypedFormData.Body()` function in older NodeJS version. --- packages/core/src/decorators/TypedFormData.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/core/src/decorators/TypedFormData.ts b/packages/core/src/decorators/TypedFormData.ts index 92fdcede6..e42b3c6db 100644 --- a/packages/core/src/decorators/TypedFormData.ts +++ b/packages/core/src/decorators/TypedFormData.ts @@ -75,6 +75,10 @@ export namespace TypedFormData { export function Body( props?: IRequestFormDataProps, ): ParameterDecorator { + if (typeof File === "undefined") + throw new Error( + "Error on TypedFormData.Body(): 'File' class is not supported in the older version of NodeJS. Upgrade the NodeJS to the modern.", + ); const checker = validate_request_form_data(props); const predicator = (type: "express" | "fastify") => new Singleton(() => From 3576fb3ee4be0cfd78158874d9d45b3b6dacbb43 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 19 Jul 2024 05:04:43 +0900 Subject: [PATCH 036/204] Fix test program level bug --- packages/core/package.json | 2 +- packages/sdk/package.json | 4 ++-- test/features/date/src/api/structures/IDateDefined.ts | 3 --- test/features/date/tsconfig.json | 4 ++-- test/package.json | 6 +++--- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 5db409457..1c9772093 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.2-dev.20240720", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.4.2", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 98cf5e7ca..db4dee64e 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.2-dev.20240720", - "@nestia/core": "^3.7.2-dev.20240720", + "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", + "@nestia/core": "../core/nestia-core-3.7.2-dev.20240720.tgz", "@samchon/openapi": "^0.4.2", "cli": "^1.0.1", "get-function-location": "^2.0.0", diff --git a/test/features/date/src/api/structures/IDateDefined.ts b/test/features/date/src/api/structures/IDateDefined.ts index 4cf4c5d30..74863bf28 100644 --- a/test/features/date/src/api/structures/IDateDefined.ts +++ b/test/features/date/src/api/structures/IDateDefined.ts @@ -6,9 +6,6 @@ export interface IDateDefined { date: Date; - /** - * @format date-time - */ date_with_tag: Date; date_but_union: Date | Buffer; diff --git a/test/features/date/tsconfig.json b/test/features/date/tsconfig.json index c33dfa28f..3c815da8b 100644 --- a/test/features/date/tsconfig.json +++ b/test/features/date/tsconfig.json @@ -45,9 +45,9 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - // "outDir": "./", /* Specify an output folder for all emitted files. */ + "outDir": "./bin", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ - "noEmit": true, /* Disable emitting files from a compilation. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ diff --git a/test/package.json b/test/package.json index ca595781b..ff6a91dc0 100644 --- a/test/package.json +++ b/test/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.2-dev.20240720", + "@nestia/sdk": "../packages/sdk/nestia-sdk-3.7.2-dev.20240720.tgz", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.4.2", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.2-dev.20240720", + "@nestia/core": "../packages/core/nestia-core-3.7.2-dev.20240720.tgz", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.2-dev.20240720", + "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", From a1071be0120d7fdeeb94c27c9144fc9a433b8643 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Fri, 19 Jul 2024 13:36:00 +0900 Subject: [PATCH 037/204] Publish v3.7.2 --- package.json | 2 +- packages/core/package.json | 6 +- packages/fetcher/package.json | 2 +- packages/sdk/package.json | 10 +-- test/package.json | 8 +-- website/package-lock.json | 120 ++++++++++++++++++---------------- website/package.json | 6 +- 7 files changed, 82 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 4587484fd..2b40bc376 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.2-dev.20240720", + "version": "3.7.2", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index 1c9772093..479a25968 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.2-dev.20240720", + "version": "3.7.2", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", + "@nestia/fetcher": "^3.7.2", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.4.2", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.2-dev.20240720", + "@nestia/fetcher": ">=3.7.2", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 792671fcd..ad1fa31da 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.2-dev.20240720", + "version": "3.7.3", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index db4dee64e..4d1003356 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.2-dev.20240720", + "version": "3.7.2", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,8 +32,8 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "../fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", - "@nestia/core": "../core/nestia-core-3.7.2-dev.20240720.tgz", + "@nestia/fetcher": "^3.7.2", + "@nestia/core": "^3.7.2", "@samchon/openapi": "^0.4.2", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.5.2" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.2-dev.20240720", - "@nestia/core": ">=3.7.2-dev.20240720", + "@nestia/fetcher": ">=3.7.2", + "@nestia/core": ">=3.7.2", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/test/package.json b/test/package.json index ff6a91dc0..52098371a 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.2-dev.20240720", + "version": "3.7.2", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "../packages/sdk/nestia-sdk-3.7.2-dev.20240720.tgz", + "@nestia/sdk": "^3.7.2", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.4.2", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "../packages/core/nestia-core-3.7.2-dev.20240720.tgz", + "@nestia/core": "^3.7.2", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "../packages/fetcher/nestia-fetcher-3.7.2-dev.20240720.tgz", + "@nestia/fetcher": "^3.7.2", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", diff --git a/website/package-lock.json b/website/package-lock.json index 0a55b60b2..6f3622f6b 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -18,14 +18,14 @@ "@samchon/openapi": "^0.4.2", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", - "next": "14.1.1", - "nextra": "latest", - "nextra-theme-docs": "latest", + "next": "14.2.5", + "nextra": "^2.13.4", + "nextra-theme-docs": "^2.13.4", "prettier": "^3.2.5", "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.5.0" + "typia": "^6.5.2" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -1095,14 +1095,14 @@ } }, "node_modules/@next/env": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.1.1.tgz", - "integrity": "sha512-7CnQyD5G8shHxQIIg3c7/pSeYFeMhsNbpU/bmvH7ZnDql7mNRgg8O2JZrhrc/soFnfBnKP4/xXNiiSIPn2w8gA==" + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.5.tgz", + "integrity": "sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==" }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.1.1.tgz", - "integrity": "sha512-yDjSFKQKTIjyT7cFv+DqQfW5jsD+tVxXTckSe1KIouKk75t1qZmj/mV3wzdmFb0XHVGtyRjDMulfVG8uCKemOQ==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.5.tgz", + "integrity": "sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==", "cpu": [ "arm64" ], @@ -1115,9 +1115,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.1.1.tgz", - "integrity": "sha512-KCQmBL0CmFmN8D64FHIZVD9I4ugQsDBBEJKiblXGgwn7wBCSe8N4Dx47sdzl4JAg39IkSN5NNrr8AniXLMb3aw==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.5.tgz", + "integrity": "sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA==", "cpu": [ "x64" ], @@ -1130,9 +1130,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.1.1.tgz", - "integrity": "sha512-YDQfbWyW0JMKhJf/T4eyFr4b3tceTorQ5w2n7I0mNVTFOvu6CGEzfwT3RSAQGTi/FFMTFcuspPec/7dFHuP7Eg==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.5.tgz", + "integrity": "sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA==", "cpu": [ "arm64" ], @@ -1145,9 +1145,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.1.1.tgz", - "integrity": "sha512-fiuN/OG6sNGRN/bRFxRvV5LyzLB8gaL8cbDH5o3mEiVwfcMzyE5T//ilMmaTrnA8HLMS6hoz4cHOu6Qcp9vxgQ==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.5.tgz", + "integrity": "sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA==", "cpu": [ "arm64" ], @@ -1160,9 +1160,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.1.1.tgz", - "integrity": "sha512-rv6AAdEXoezjbdfp3ouMuVqeLjE1Bin0AuE6qxE6V9g3Giz5/R3xpocHoAi7CufRR+lnkuUjRBn05SYJ83oKNQ==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.5.tgz", + "integrity": "sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ==", "cpu": [ "x64" ], @@ -1175,9 +1175,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.1.1.tgz", - "integrity": "sha512-YAZLGsaNeChSrpz/G7MxO3TIBLaMN8QWMr3X8bt6rCvKovwU7GqQlDu99WdvF33kI8ZahvcdbFsy4jAFzFX7og==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.5.tgz", + "integrity": "sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ==", "cpu": [ "x64" ], @@ -1190,9 +1190,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.1.1.tgz", - "integrity": "sha512-1L4mUYPBMvVDMZg1inUYyPvFSduot0g73hgfD9CODgbr4xiTYe0VOMTZzaRqYJYBA9mana0x4eaAaypmWo1r5A==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.5.tgz", + "integrity": "sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw==", "cpu": [ "arm64" ], @@ -1205,9 +1205,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.1.1.tgz", - "integrity": "sha512-jvIE9tsuj9vpbbXlR5YxrghRfMuG0Qm/nZ/1KDHc+y6FpnZ/apsgh+G6t15vefU0zp3WSpTMIdXRUsNl/7RSuw==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.5.tgz", + "integrity": "sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg==", "cpu": [ "ia32" ], @@ -1220,9 +1220,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.1.1.tgz", - "integrity": "sha512-S6K6EHDU5+1KrBDLko7/c1MNy/Ya73pIAmvKeFwsF4RmBFJSO7/7YeD4FnZ4iBdzE69PpQ4sOMU9ORKeNuxe8A==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.5.tgz", + "integrity": "sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g==", "cpu": [ "x64" ], @@ -1316,11 +1316,17 @@ "resolved": "https://registry.npmjs.org/@stackblitz/sdk/-/sdk-1.11.0.tgz", "integrity": "sha512-DFQGANNkEZRzFk1/rDP6TcFdM82ycHE+zfl9C/M/jXlH68jiqHWHFMQURLELoD8koxvu/eW5uhg94NSAZlYrUQ==" }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==" + }, "node_modules/@swc/helpers": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.2.tgz", - "integrity": "sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.5.tgz", + "integrity": "sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==", "dependencies": { + "@swc/counter": "^0.1.3", "tslib": "^2.4.0" } }, @@ -5915,12 +5921,12 @@ } }, "node_modules/next": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/next/-/next-14.1.1.tgz", - "integrity": "sha512-McrGJqlGSHeaz2yTRPkEucxQKe5Zq7uPwyeHNmJaZNY4wx9E9QdxmTp310agFRoMuIYgQrCrT3petg13fSVOww==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.5.tgz", + "integrity": "sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA==", "dependencies": { - "@next/env": "14.1.1", - "@swc/helpers": "0.5.2", + "@next/env": "14.2.5", + "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "graceful-fs": "^4.2.11", @@ -5934,18 +5940,19 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.1.1", - "@next/swc-darwin-x64": "14.1.1", - "@next/swc-linux-arm64-gnu": "14.1.1", - "@next/swc-linux-arm64-musl": "14.1.1", - "@next/swc-linux-x64-gnu": "14.1.1", - "@next/swc-linux-x64-musl": "14.1.1", - "@next/swc-win32-arm64-msvc": "14.1.1", - "@next/swc-win32-ia32-msvc": "14.1.1", - "@next/swc-win32-x64-msvc": "14.1.1" + "@next/swc-darwin-arm64": "14.2.5", + "@next/swc-darwin-x64": "14.2.5", + "@next/swc-linux-arm64-gnu": "14.2.5", + "@next/swc-linux-arm64-musl": "14.2.5", + "@next/swc-linux-x64-gnu": "14.2.5", + "@next/swc-linux-x64-musl": "14.2.5", + "@next/swc-win32-arm64-msvc": "14.2.5", + "@next/swc-win32-ia32-msvc": "14.2.5", + "@next/swc-win32-x64-msvc": "14.2.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", + "@playwright/test": "^1.41.2", "react": "^18.2.0", "react-dom": "^18.2.0", "sass": "^1.3.0" @@ -5954,6 +5961,9 @@ "@opentelemetry/api": { "optional": true }, + "@playwright/test": { + "optional": true + }, "sass": { "optional": true } @@ -7844,11 +7854,11 @@ } }, "node_modules/typia": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/typia/-/typia-6.5.0.tgz", - "integrity": "sha512-wGtAONvKseb7OwG/O/fpbfzhOWMg8h+yDuCws2MX51kScki06ABFHwRngoWQvgNWmXnG4Ny70WIZG1A/0QxReQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/typia/-/typia-6.5.2.tgz", + "integrity": "sha512-s1yqB7m8Zz4yoeLdq1OQ7Nq/svHqOr02fl9B3dOiU7m+4p5wHvJVTj7gLRtq0t51ExFUlDzSkY9STwBUNACOgA==", "dependencies": { - "@samchon/openapi": "^0.4.1", + "@samchon/openapi": "^0.4.2", "commander": "^10.0.0", "comment-json": "^4.2.3", "inquirer": "^8.2.5", diff --git a/website/package.json b/website/package.json index d66f32c42..ae256be1d 100644 --- a/website/package.json +++ b/website/package.json @@ -27,9 +27,9 @@ "@samchon/openapi": "^0.4.2", "@stackblitz/sdk": "^1.9.0", "js-yaml": "^4.1.0", - "next": "14.1.1", - "nextra": "latest", - "nextra-theme-docs": "latest", + "next": "14.2.5", + "nextra": "^2.13.4", + "nextra-theme-docs": "^2.13.4", "prettier": "^3.2.5", "react": "18.2.0", "react-dom": "18.2.0", From 3ecce053394f8d27a3cd300415af54026dccb169 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Mon, 22 Jul 2024 16:09:22 +0900 Subject: [PATCH 038/204] `npx nestia openai` command. New command generating OpenAI function calling schemas' document. --- README.md | 5 +- benchmark/package.json | 2 +- package.json | 2 +- packages/benchmark/package.json | 2 +- packages/cli/package.json | 8 +- packages/cli/src/index.ts | 4 +- packages/core/README.md | 5 +- packages/core/package.json | 10 +- packages/e2e/package.json | 2 +- packages/fetcher/README.md | 5 +- packages/fetcher/package.json | 2 +- packages/migrate/package.json | 2 +- packages/sdk/README.md | 5 +- packages/sdk/package.json | 15 +- packages/sdk/src/INestiaConfig.ts | 98 ++ packages/sdk/src/NestiaSdkApplication.ts | 21 + .../executable/internal/NestiaSdkCommand.ts | 1 + packages/sdk/src/executable/sdk.ts | 8 +- packages/sdk/src/generates/OpenAiGenerator.ts | 60 + packages/sdk/src/generates/SdkGenerator.ts | 6 +- .../sdk/src/generates/SwaggerGenerator.ts | 62 +- test/executable/start.js | 17 +- test/features/all/swagger.json | 4 +- .../swagger.json | 2 +- .../app-globalPrefix-versionUri/swagger.json | 2 +- test/features/app-globalPrefix/swagger.json | 2 +- test/features/app-routerModule/swagger.json | 2 +- test/features/app-versionHeader/swagger.json | 2 +- test/features/app-versionUri/swagger.json | 2 +- test/features/app/swagger.json | 2 +- test/features/beautify-4/swagger.json | 5 +- test/features/beautify-false/swagger.json | 2 +- test/features/beautify/swagger.json | 5 +- test/features/body-config-assert/swagger.json | 2 +- .../body-config-assertClone/swagger.json | 2 +- .../body-config-assertEquals/swagger.json | 2 +- .../body-config-assertPrune/swagger.json | 2 +- test/features/body-config-equals/swagger.json | 2 +- test/features/body-config-is/swagger.json | 2 +- .../body-config-validate/swagger.json | 2 +- .../body-config-validateClone/swagger.json | 2 +- .../body-config-validateEquals/swagger.json | 2 +- .../body-config-validatePrune/swagger.json | 2 +- .../body-generic-default/swagger.json | 2 +- test/features/body-manual-assert/swagger.json | 2 +- test/features/body-manual-is/swagger.json | 2 +- .../body-manual-validate/swagger.json | 2 +- test/features/body/swagger.json | 2 +- test/features/cli-config-project/swagger.json | 2 +- test/features/cli-config/swagger.json | 2 +- test/features/cli-project/swagger.json | 2 +- .../swagger.json | 2 +- .../functional/sellers/authenticate/index.ts | 1 - .../src/api/functional/users/oauth/index.ts | 1 + .../src/api/functional/users/user/index.ts | 2 +- .../features/clone-and-propagate/swagger.json | 30 +- test/features/clone-implicit/swagger.json | 5 +- test/features/clone-native/swagger.json | 4 +- test/features/config-pattern/swagger.json | 2 +- test/features/date/swagger.json | 2 +- .../packages/api/package.json | 6 +- .../distribute-assert-json/swagger.json | 2 +- .../packages/api/package.json | 6 +- test/features/distribute-assert/swagger.json | 2 +- .../distribute-json/packages/api/package.json | 6 +- test/features/distribute-json/swagger.json | 2 +- test/features/distribute/=6.5.4 | 0 .../distribute/packages/api/package.json | 6 +- test/features/distribute/swagger.json | 2 +- test/features/duplicated/swagger.json | 2 +- test/features/e2e/swagger.json | 2 +- .../functional/sellers/authenticate/index.ts | 1 - test/features/encrypted/swagger.json | 4 +- test/features/exception-filter/swagger.json | 2 +- .../src/api/functional/fail/index.ts | 2 - .../src/api/functional/success/index.ts | 2 - .../exception-with-propagate/swagger.json | 2 +- .../src/api/functional/exception/index.ts | 6 - test/features/exception/swagger.json | 8 +- .../functional/sellers/authenticate/index.ts | 1 - test/features/fastify/swagger.json | 2 +- test/features/headers-decompose/swagger.json | 2 +- test/features/headers/swagger.json | 2 +- .../src/api/functional/bbs/articles/index.ts | 2 - test/features/ignore/swagger.json | 2 +- test/features/kebab/swagger.json | 2 +- test/features/method/swagger.json | 2 +- test/features/migrate/swagger.json | 2 +- .../multipart-form-data-fastify/swagger.json | 2 +- .../features/multipart-form-data/swagger.json | 2 +- test/features/non-equals/swagger.json | 2 +- .../openai-keyword-separate/nestia.config.ts | 15 + .../openai-keyword-separate/openai.json | 1266 +++++++++++++++++ .../openai-keyword-separate/src/Backend.ts | 25 + .../src/api/structures/IAttachmentFile.ts | 41 + .../src/api/structures/IBbsArticle.ts | 196 +++ .../src/api/structures/IPage.ts | 77 + .../src/controllers/BbsArticleController.ts | 122 ++ .../test/features/api/test_openai_document.ts | 61 + .../openai-keyword-separate/src/test/index.ts | 41 + .../openai-keyword-separate/tsconfig.json | 99 ++ test/features/openai-keyword/nestia.config.ts | 11 + test/features/openai-keyword/openai.json | 878 ++++++++++++ test/features/openai-keyword/src/Backend.ts | 25 + .../src/api/structures/IAttachmentFile.ts | 41 + .../src/api/structures/IBbsArticle.ts | 196 +++ .../src/api/structures/IPage.ts | 77 + .../src/controllers/BbsArticleController.ts | 122 ++ .../test/features/api/test_openai_document.ts | 23 + .../features/openai-keyword/src/test/index.ts | 41 + test/features/openai-keyword/tsconfig.json | 99 ++ test/features/openai/nestia.config.ts | 10 + test/features/openai/openai.json | 848 +++++++++++ test/features/openai/src/Backend.ts | 25 + .../src/api/structures/IAttachmentFile.ts | 41 + .../openai/src/api/structures/IBbsArticle.ts | 196 +++ .../openai/src/api/structures/IPage.ts | 77 + .../src/controllers/BbsArticleController.ts | 122 ++ .../test/features/api/test_openai_document.ts | 25 + test/features/openai/src/test/index.ts | 41 + test/features/openai/tsconfig.json | 99 ++ test/features/openapi_v2/swagger.json | 2 +- test/features/openapi_v3/swagger.json | 2 +- .../src/api/functional/operationId/index.ts | 2 - test/features/operationId/swagger.json | 2 +- test/features/param/swagger.json | 25 +- test/features/plain/swagger.json | 2 +- .../src/api/functional/members/index.ts | 1 - .../api/automated/test_api_members_login.ts | 15 +- test/features/propagate/swagger.json | 2 +- .../query-decompose-false/swagger.json | 2 +- .../query-decompose-true/swagger.json | 2 +- test/features/query/swagger.json | 2 +- .../features/route-manual-assert/swagger.json | 2 +- test/features/route-manual-is/swagger.json | 2 +- .../route-manual-stringify/swagger.json | 2 +- .../route-manual-validate/swagger.json | 2 +- test/features/route/swagger.json | 2 +- test/features/security/swagger.json | 2 +- test/features/simulate/swagger.json | 2 +- test/features/status/swagger.json | 2 +- test/features/swagger-customizer/swagger.json | 2 +- test/features/swagger-example/swagger.json | 154 +- test/features/tags/swagger.json | 2 +- test/features/variable/swagger.json | 2 +- test/features/websocket-clone/swagger.json | 2 +- test/features/websocket/swagger.json | 2 +- test/package.json | 12 +- website/package.json | 2 +- 149 files changed, 5392 insertions(+), 344 deletions(-) create mode 100644 packages/sdk/src/generates/OpenAiGenerator.ts create mode 100644 test/features/distribute/=6.5.4 create mode 100644 test/features/openai-keyword-separate/nestia.config.ts create mode 100644 test/features/openai-keyword-separate/openai.json create mode 100644 test/features/openai-keyword-separate/src/Backend.ts create mode 100644 test/features/openai-keyword-separate/src/api/structures/IAttachmentFile.ts create mode 100644 test/features/openai-keyword-separate/src/api/structures/IBbsArticle.ts create mode 100644 test/features/openai-keyword-separate/src/api/structures/IPage.ts create mode 100644 test/features/openai-keyword-separate/src/controllers/BbsArticleController.ts create mode 100644 test/features/openai-keyword-separate/src/test/features/api/test_openai_document.ts create mode 100644 test/features/openai-keyword-separate/src/test/index.ts create mode 100644 test/features/openai-keyword-separate/tsconfig.json create mode 100644 test/features/openai-keyword/nestia.config.ts create mode 100644 test/features/openai-keyword/openai.json create mode 100644 test/features/openai-keyword/src/Backend.ts create mode 100644 test/features/openai-keyword/src/api/structures/IAttachmentFile.ts create mode 100644 test/features/openai-keyword/src/api/structures/IBbsArticle.ts create mode 100644 test/features/openai-keyword/src/api/structures/IPage.ts create mode 100644 test/features/openai-keyword/src/controllers/BbsArticleController.ts create mode 100644 test/features/openai-keyword/src/test/features/api/test_openai_document.ts create mode 100644 test/features/openai-keyword/src/test/index.ts create mode 100644 test/features/openai-keyword/tsconfig.json create mode 100644 test/features/openai/nestia.config.ts create mode 100644 test/features/openai/openai.json create mode 100644 test/features/openai/src/Backend.ts create mode 100644 test/features/openai/src/api/structures/IAttachmentFile.ts create mode 100644 test/features/openai/src/api/structures/IBbsArticle.ts create mode 100644 test/features/openai/src/api/structures/IPage.ts create mode 100644 test/features/openai/src/controllers/BbsArticleController.ts create mode 100644 test/features/openai/src/test/features/api/test_openai_document.ts create mode 100644 test/features/openai/src/test/index.ts create mode 100644 test/features/openai/tsconfig.json diff --git a/README.md b/README.md index 796a338f1..3dab8f3f3 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) -[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) @@ -15,6 +15,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Advanced WebSocket routes - `@nestia/sdk`: - Swagger generator evolved than ever + - OpenAI function calling schema generator - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator diff --git a/benchmark/package.json b/benchmark/package.json index e93636491..ca34261e6 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -42,7 +42,7 @@ "reflect-metadata": "^0.2.2", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.5.2" + "typia": "^6.5.4" }, "devDependencies": { "@types/autocannon": "^7.9.0", diff --git a/package.json b/package.json index 2b40bc376..925440759 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.7.2", + "version": "3.8.0", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 55fd294af..4eb15cf5b 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -34,7 +34,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.5.2", + "typia": "^6.5.4", "uuid": "^10.0.0" }, "dependencies": { diff --git a/packages/cli/package.json b/packages/cli/package.json index ac907801a..0c965723e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "nestia", - "version": "5.4.0", + "version": "5.5.0", "description": "Nestia CLI tool", "main": "bin/index.js", "bin": { @@ -36,12 +36,12 @@ "inquirer": "^8.2.5" }, "devDependencies": { - "@nestia/core": "^3.7.0", - "@nestia/sdk": "^3.7.0", + "@nestia/core": "^3.8.0", + "@nestia/sdk": "^3.8.0", "@types/inquirer": "^9.0.3", "@types/node": "^18.11.16", "rimraf": "^3.0.2", - "typescript": "^5.5.2" + "typescript": "^5.5.3" }, "files": [ "bin", diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 9cf6b6bc8..c340c04bf 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -10,7 +10,8 @@ npx nestia [command] [options?] 5. npx nestia init 6. npx nestia sdk 7. npx nestia swagger - 8. npx nestia e2e + 8. npx nestia openai + 9. npx nestia e2e `; function halt(desc: string): never { @@ -43,6 +44,7 @@ async function main(): Promise { type === "dependencies" || type === "init" || type === "sdk" || + type === "openai" || type === "swagger" || type === "e2e" ) { diff --git a/packages/core/README.md b/packages/core/README.md index 796a338f1..3dab8f3f3 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) -[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) @@ -15,6 +15,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Advanced WebSocket routes - `@nestia/sdk`: - Swagger generator evolved than ever + - OpenAI function calling schema generator - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator diff --git a/packages/core/package.json b/packages/core/package.json index 479a25968..572434fc6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.7.2", + "version": "3.8.0", "description": "Super-fast validation decorators of NestJS", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -36,7 +36,7 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.2", + "@nestia/fetcher": "^3.8.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^0.4.2", @@ -49,16 +49,16 @@ "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", "tgrid": "^1.0.0", - "typia": "^6.5.2", + "typia": "^6.5.4", "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.2", + "@nestia/fetcher": ">=3.8.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "rxjs": ">=6.0.3", - "typia": ">=6.5.2 <7.0.0" + "typia": ">=6.5.4 <7.0.0" }, "devDependencies": { "@fastify/multipart": "^8.1.0", diff --git a/packages/e2e/package.json b/packages/e2e/package.json index 668f4a1e8..ed1739d62 100644 --- a/packages/e2e/package.json +++ b/packages/e2e/package.json @@ -41,7 +41,7 @@ "ts-patch": "^3.2.1", "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", - "typia": "^6.5.2" + "typia": "^6.5.4" }, "files": [ "lib", diff --git a/packages/fetcher/README.md b/packages/fetcher/README.md index 796a338f1..3dab8f3f3 100644 --- a/packages/fetcher/README.md +++ b/packages/fetcher/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) -[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) @@ -15,6 +15,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Advanced WebSocket routes - `@nestia/sdk`: - Swagger generator evolved than ever + - OpenAI function calling schema generator - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index ad1fa31da..e2399918f 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/fetcher", - "version": "3.7.3", + "version": "3.8.0", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 439d1a3b0..0bf3ca850 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -71,7 +71,7 @@ "prettier": "^3.2.5", "tstl": "^3.0.0", "typescript": "^5.5.3", - "typia": "^6.5.2" + "typia": "^6.5.4" }, "files": [ "lib", diff --git a/packages/sdk/README.md b/packages/sdk/README.md index 796a338f1..3dab8f3f3 100644 --- a/packages/sdk/README.md +++ b/packages/sdk/README.md @@ -2,8 +2,8 @@ ![Nestia Logo](https://nestia.io/logo.png) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE) -[![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) -[![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher) +[![npm version](https://img.shields.io/npm/v/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) +[![Downloads](https://img.shields.io/npm/dm/@nestia/sdk.svg)](https://www.npmjs.com/package/@nestia/sdk) [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild) [![Guide Documents](https://img.shields.io/badge/guide-documents-forestgreen)](https://nestia.io/docs/) [![Discord Badge](https://img.shields.io/badge/discord-NestJS/Nestia-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.com/channels/520622812742811698/1197293125434093701)](https://discord.com/channels/520622812742811698/1181877086797967420) @@ -15,6 +15,7 @@ Nestia is a set of helper libraries for NestJS, supporting below features: - Advanced WebSocket routes - `@nestia/sdk`: - Swagger generator evolved than ever + - OpenAI function calling schema generator - SDK library generator for clients - Mockup Simulator for client applications - Automatic E2E test functions generator diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 4d1003356..fcdaac63c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.7.2", + "version": "3.8.0", "description": "Nestia SDK and Swagger generator", "main": "lib/index.js", "typings": "lib/index.d.ts", @@ -32,9 +32,10 @@ }, "homepage": "https://nestia.io", "dependencies": { - "@nestia/fetcher": "^3.7.2", - "@nestia/core": "^3.7.2", + "@nestia/core": "^3.8.0", + "@nestia/fetcher": "^3.8.0", "@samchon/openapi": "^0.4.2", + "@wrtnio/openai-function-schema": "^0.2.0", "cli": "^1.0.1", "get-function-location": "^2.0.0", "glob": "^7.2.0", @@ -44,16 +45,16 @@ "tsconfck": "^2.0.1", "tsconfig-paths": "^4.1.1", "tstl": "^3.0.0", - "typia": "^6.5.2" + "typia": "^6.5.4" }, "peerDependencies": { - "@nestia/fetcher": ">=3.7.2", - "@nestia/core": ">=3.7.2", + "@nestia/core": ">=3.8.0", + "@nestia/fetcher": ">=3.8.0", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", "ts-node": ">=10.6.0", - "typia": ">=6.5.2 <7.0.0" + "typia": ">=6.5.4 <7.0.0" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", diff --git a/packages/sdk/src/INestiaConfig.ts b/packages/sdk/src/INestiaConfig.ts index c7ea79497..0b1f7d4e6 100644 --- a/packages/sdk/src/INestiaConfig.ts +++ b/packages/sdk/src/INestiaConfig.ts @@ -1,5 +1,6 @@ import type { INestApplication } from "@nestjs/common"; import { OpenApi } from "@samchon/openapi"; +import { IOpenAiSchema } from "@wrtnio/openai-function-schema"; /** * Definition for the `nestia.config.ts` file. @@ -28,6 +29,15 @@ export interface INestiaConfig { */ swagger?: INestiaConfig.ISwaggerConfig; + /** + * Configuration for the OpenAI funtion call schema generation. + * + * You can generate the schema for the OpenAI function call through + * this configuration. Recommend to use the function call schemas with + * the {@link swagger} document. + */ + openai?: INestiaConfig.IOpenAiConnfig; + /** * Output directory that SDK would be placed in. * @@ -268,4 +278,92 @@ export namespace INestiaConfig { path: string; }): string; } + + /** + * Configuration for the OpenAI funtion call schema generation. + */ + export interface IOpenAiConnfig { + /** + * Output path of the `openai.json`. + * + * If you've configured only directory, the file name would be the `openai.json`. + * Otherwise you've configured the full path with file name and extension, the + * `openai.json` file would be renamed to it. + */ + output: string; + + /** + * Whether the parameters are keyworded or not. + * + * If this property value is `true`, length of the + * {@link IOpenAiDocument.IFunction.parameters} is always 1, and type of the + * pararameter is always {@link IOpenAiSchema.IObject} type. Also, its + * properties are following below rules: + * + * - `pathParameters`: Path parameters of {@link ISwaggerMigrateRoute.parameters} + * - `query`: Query parameter of {@link ISwaggerMigrateRoute.query} + * - `body`: Body parameter of {@link ISwaggerMigrateRoute.body} + * + * ```typescript + * { + * ...pathParameters, + * query, + * body, + * } + * ``` + * + * Otherwise (this property value is `false`), length of the + * {@link IOpenAiDocument.IFunction.parameters} is variable, and sequence of the + * parameters are following below rules. + * + * ```typescript + * [ + * ...pathParameters, + * ...(query ? [query] : []), + * ...(body ? [body] : []), + * ] + * ``` + * + * @default false + */ + keyword?: boolean; + + /** + * Separator function for the parameters. + * + * When composing parameter arguments through OpenAI function call, + * there can be a case that some parameters must be composed by human, or + * LLM cannot understand the parameter. For example, if the parameter type + * has configured {@link IOpenAiSchema.IString["x-wrtn-secret-key"]}, the + * secret key value must be composed by human, not by LLM (Large Language Model). + * + * In that case, if you configure this property with a function that + * predicating whether the schema value must be composed by human or not, + * the parameters would be separated into two parts. + * + * - {@link IOpenAiFunction.separated.llm} + * - {@link IOpenAiFunction.separated.human} + * + * When writing the function, note that returning value `true` means to be + * a human composing the value, and `false` means to LLM composing the value. + * Also, when predicating the schema, it would better to utilize the + * {@link OpenAiTypeChecker} features. + * + * @param schema Schema to be separated. + * @returns Whether the schema value must be composed by human or not. + * @default null + */ + separate?: null | ((schema: IOpenAiSchema) => boolean); + + /** + * Whether to beautify JSON content or not. + * + * If you configure this property to be `true`, the `openai.json` file would + * be beautified with indentation (2 spaces) and line breaks. If you configure + * numeric value instead, the indentation would be specified by the number. + * + * @default false + */ + beautify?: boolean | number; + } } diff --git a/packages/sdk/src/NestiaSdkApplication.ts b/packages/sdk/src/NestiaSdkApplication.ts index dc4ece96d..6a96bf0c8 100644 --- a/packages/sdk/src/NestiaSdkApplication.ts +++ b/packages/sdk/src/NestiaSdkApplication.ts @@ -9,6 +9,7 @@ import { ConfigAnalyzer } from "./analyses/ConfigAnalyzer"; import { ReflectControllerAnalyzer } from "./analyses/ReflectControllerAnalyzer"; import { TypedControllerAnalyzer } from "./analyses/TypedControllerAnalyzer"; import { E2eGenerator } from "./generates/E2eGenerator"; +import { OpenAiGenerator } from "./generates/OpenAiGenerator"; import { SdkGenerator } from "./generates/SdkGenerator"; import { SwaggerGenerator } from "./generates/SwaggerGenerator"; import { IErrorReport } from "./structures/IErrorReport"; @@ -93,6 +94,26 @@ export class NestiaSdkApplication { await this.generate("swagger", SwaggerGenerator.generate); } + public async openai(): Promise { + if (!this.config.openai?.output) + throw new Error( + `Error on NestiaApplication.openai(): output path of the "openai.json" is not specified.`, + ); + + const parsed: path.ParsedPath = path.parse(this.config.openai.output); + const directory: string = !!parsed.ext + ? path.resolve(parsed.dir) + : this.config.openai.output; + const stats: fs.Stats = await fs.promises.lstat(directory); + if (stats.isDirectory() === false) + throw new Error( + "Error on NestiaApplication.openai(): output directory does not exists.", + ); + + print_title("Nestia OpenAI Function Calling Schema Generator"); + await this.generate("openai", OpenAiGenerator.generate); + } + private async generate( method: string, archiver: ( diff --git a/packages/sdk/src/executable/internal/NestiaSdkCommand.ts b/packages/sdk/src/executable/internal/NestiaSdkCommand.ts index 26750e697..8c9c896f0 100644 --- a/packages/sdk/src/executable/internal/NestiaSdkCommand.ts +++ b/packages/sdk/src/executable/internal/NestiaSdkCommand.ts @@ -7,6 +7,7 @@ import { NestiaConfigLoader } from "./NestiaConfigLoader"; export namespace NestiaSdkCommand { export const sdk = () => main((app) => app.sdk()); export const swagger = () => main((app) => app.swagger()); + export const openai = () => main((app) => app.openai()); export const e2e = () => main((app) => app.e2e()); const main = async (task: (app: NestiaSdkApplication) => Promise) => { diff --git a/packages/sdk/src/executable/sdk.ts b/packages/sdk/src/executable/sdk.ts index 915385ce2..931d0cdc8 100644 --- a/packages/sdk/src/executable/sdk.ts +++ b/packages/sdk/src/executable/sdk.ts @@ -14,9 +14,10 @@ npx @nestia/sdk [command] [options?] - npx @nestia/sdk dependencies - npx @nestia/sdk dependencies --manager pnpm 2. npx @nestia/sdk init - 3. npx @nestia/sdk sdk --config? [config file] - 4. npx @nestia/sdk swagger --config? [config file] - 5. npx @nestia/sdk e2e --config? [config file] + 3. npx @nestia/sdk sdk --config? [config file] --project? [project file] + 4. npx @nestia/sdk swagger --config? [config file] --project? [project file] + 5. npx @nestia/sdk openai --config? [config file] --project? [project file] + 6. npx @nestia/sdk e2e --config? [config file] --project? [project file] `; function halt(desc: string): never { @@ -62,6 +63,7 @@ async function main() { else if (type === "init") await initialize(); else if (type === "sdk") await execute((c) => c.sdk()); else if (type === "swagger") await execute((c) => c.swagger()); + else if (type === "openai") await execute((c) => c.openai()); else if (type === "e2e") await execute((c) => c.e2e()); else halt(USAGE); diff --git a/packages/sdk/src/generates/OpenAiGenerator.ts b/packages/sdk/src/generates/OpenAiGenerator.ts new file mode 100644 index 000000000..562b0c0e9 --- /dev/null +++ b/packages/sdk/src/generates/OpenAiGenerator.ts @@ -0,0 +1,60 @@ +import { OpenApi } from "@samchon/openapi"; +import { + IOpenAiDocument, + OpenAiComposer, +} from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import path from "path"; + +import { INestiaProject } from "../structures/INestiaProject"; +import { ITypedHttpRoute } from "../structures/ITypedHttpRoute"; +import { ITypedWebSocketRoute } from "../structures/ITypedWebSocketRoute"; +import { SwaggerGenerator } from "./SwaggerGenerator"; + +export namespace OpenAiGenerator { + export const generate = + (project: INestiaProject) => + async ( + routes: Array, + ): Promise => { + console.log("Generating OpenAI Function Calling Document"); + + const config = project.config.openai!; + const parsed: path.ParsedPath = path.parse(config.output); + const directory: string = path.dirname(parsed.dir); + if (fs.existsSync(directory) === false) + try { + await fs.promises.mkdir(directory); + } catch {} + if (fs.existsSync(directory) === false) + throw new Error( + `Error on NestiaApplication.openai(): failed to create output directory: ${directory}`, + ); + + const location: string = !!parsed.ext + ? path.resolve(config.output) + : path.join(path.resolve(config.output), "openai.json"); + const swagger: OpenApi.IDocument = await SwaggerGenerator.compose({ + ...project, + config: { + ...project.config, + swagger: project.config.swagger ?? { output: "" }, + }, + })(routes); + const document: IOpenAiDocument = OpenAiComposer.document({ + swagger, + options: config, + }); + await fs.promises.writeFile( + location, + !config.beautify + ? JSON.stringify(document) + : JSON.stringify( + document, + null, + typeof config.beautify === "number" ? config.beautify : 2, + ), + "utf8", + ); + }; +} diff --git a/packages/sdk/src/generates/SdkGenerator.ts b/packages/sdk/src/generates/SdkGenerator.ts index 7882108f3..97f74fc24 100644 --- a/packages/sdk/src/generates/SdkGenerator.ts +++ b/packages/sdk/src/generates/SdkGenerator.ts @@ -32,9 +32,9 @@ export namespace SdkGenerator { lazyProperties: [], lazySchemas: [], errors, - swagger: await SwaggerGenerator.initialize({ - output: "", - }), + swagger: await SwaggerGenerator.initialize( + project.config.swagger ?? { output: "" }, + ), }); for (const r of routes) if (r.protocol === "http") validator(r); if (errors.length) { diff --git a/packages/sdk/src/generates/SwaggerGenerator.ts b/packages/sdk/src/generates/SwaggerGenerator.ts index 09bdc059c..46ff5e779 100644 --- a/packages/sdk/src/generates/SwaggerGenerator.ts +++ b/packages/sdk/src/generates/SwaggerGenerator.ts @@ -35,7 +35,7 @@ export namespace SwaggerGenerator { async ( routeList: Array, ): Promise => { - console.log("Generating Swagger Documents"); + console.log("Generating Swagger Document"); // VALIDATE SECURITY const config = project.config.swagger!; @@ -56,9 +56,46 @@ export namespace SwaggerGenerator { `Error on NestiaApplication.swagger(): failed to create output directory: ${directory}`, ); + // COMPOSE SWAGGER DOCUMENT const location: string = !!parsed.ext ? path.resolve(config.output) : path.join(path.resolve(config.output), "swagger.json"); + const swagger: OpenApi.IDocument = await compose(project)(routeList); + + // DO GENERATE + const document: + | OpenApi.IDocument + | SwaggerV2.IDocument + | OpenApiV3.IDocument = + config.openapi === "2.0" + ? OpenApi.downgrade(swagger, config.openapi as "2.0") + : config.openapi === "3.0" + ? OpenApi.downgrade(swagger, config.openapi as "3.0") + : swagger; + await fs.promises.writeFile( + location, + !config.beautify + ? JSON.stringify(document) + : JSON.stringify( + document, + null, + typeof config.beautify === "number" ? config.beautify : 2, + ), + "utf8", + ); + }; + + export const compose = + (project: INestiaProject) => + async ( + routeList: Array, + ): Promise => { + // VALIDATE SECURITY + const config = project.config.swagger!; + const httpRoutes: ITypedHttpRoute[] = routeList.filter( + (route): route is ITypedHttpRoute => route.protocol === "http", + ) as ITypedHttpRoute[]; + validate_security(config)(httpRoutes); const collection: MetadataCollection = new MetadataCollection({ replace: MetadataCollection.replace, @@ -206,28 +243,7 @@ export namespace SwaggerGenerator { get: (accessor: Accessor) => customizer.get.get()(accessor), }); } - - // DO GENERATE - const document: - | OpenApi.IDocument - | SwaggerV2.IDocument - | OpenApiV3.IDocument = - config.openapi === "2.0" - ? OpenApi.downgrade(swagger, config.openapi as "2.0") - : config.openapi === "3.0" - ? OpenApi.downgrade(swagger, config.openapi as "3.0") - : swagger; - await fs.promises.writeFile( - location, - !config.beautify - ? JSON.stringify(document) - : JSON.stringify( - document, - null, - typeof config.beautify === "number" ? config.beautify : 2, - ), - "utf8", - ); + return swagger; }; const validate_security = diff --git a/test/executable/start.js b/test/executable/start.js index 37656b4e7..2702a81df 100644 --- a/test/executable/start.js +++ b/test/executable/start.js @@ -18,8 +18,8 @@ const feature = (name) => { name === "cli-config" || name === "cli-config-project" ? " --config nestia.configuration.ts" : name === "cli-config-project" || name === "cli-project" - ? " --project tsconfig.nestia.json" - : ""; + ? " --project tsconfig.nestia.json" + : ""; cp.execSync(`npx nestia ${type}${tail}`, { stdio: "ignore" }); }; @@ -36,7 +36,7 @@ const feature = (name) => { return; } - // GENERATE SWAGGER & SDK & E2E + // GENERATE SWAGGER & OPENAI & SDK & E2E for (const file of [ "swagger.json", "src/api/functional", @@ -52,12 +52,13 @@ const feature = (name) => { if (name.includes("distribute")) cp.execSync(`npx rimraf packages/api`, { stdio: "ignore" }); - generate("swagger"); - generate("sdk"); + const config = fs.readFileSync(`${featureDirectory(name)}/${file}`, "utf8"); { - const config = fs.readFileSync(`${featureDirectory(name)}/${file}`, "utf8"); - if (config.includes("e2e:")) generate("e2e"); + const lines = config.split("\r\n").join("\n").split("\n"); + if (lines.some((l) => l.startsWith(` output:`))) generate("sdk"); } + for (const kind of ["swagger", "openai", "e2e"]) + if (config.includes(`${kind}:`)) generate(kind); cp.execSync("npx tsc", { stdio: "ignore" }); // RUN TEST AUTOMATION PROGRAM @@ -89,11 +90,9 @@ const main = async () => { const only = process.argv.findIndex((str) => str === "--only"); if (only !== -1 && process.argv.length >= only + 1) return (str) => str.includes(process.argv[only + 1]); - const from = process.argv.findIndex((str) => str === "--from"); if (from !== -1 && process.argv.length >= from + 1) return (str) => str >= process.argv[from + 1]; - return () => true; })(); if (!process.argv.includes("--skipFeatures")) { diff --git a/test/features/all/swagger.json b/test/features/all/swagger.json index d0abb0f2a..ea64a1d8f 100644 --- a/test/features/all/swagger.json +++ b/test/features/all/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json index f63236beb..07bb81579 100644 --- a/test/features/app-globalPrefix-versionUri-routerModule/swagger.json +++ b/test/features/app-globalPrefix-versionUri-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/v1/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v2/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v3/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v2/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v3/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v3/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v2/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v3/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/api/v1/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v1/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v2/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/api/v3/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix-versionUri/swagger.json b/test/features/app-globalPrefix-versionUri/swagger.json index a73cee794..f7398350a 100644 --- a/test/features/app-globalPrefix-versionUri/swagger.json +++ b/test/features/app-globalPrefix-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/api/internal/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/api/internal/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/api/internal/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/api/internal/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/api/internal/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/api/internal/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-globalPrefix/swagger.json b/test/features/app-globalPrefix/swagger.json index 159aa869b..0419d07f1 100644 --- a/test/features/app-globalPrefix/swagger.json +++ b/test/features/app-globalPrefix/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/x/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/x/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/x/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/x/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/x/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/x/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-routerModule/swagger.json b/test/features/app-routerModule/swagger.json index dbe6b80ee..1a503ef85 100644 --- a/test/features/app-routerModule/swagger.json +++ b/test/features/app-routerModule/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/common/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionHeader/swagger.json b/test/features/app-versionHeader/swagger.json index fb68d2fa9..2365af3e5 100644 --- a/test/features/app-versionHeader/swagger.json +++ b/test/features/app-versionHeader/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/bbs/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app-versionUri/swagger.json b/test/features/app-versionUri/swagger.json index e1c3c417f..e8f1f5e22 100644 --- a/test/features/app-versionUri/swagger.json +++ b/test/features/app-versionUri/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/v1/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/v1/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/v1/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/v2/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/v1/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/v2/bbs/{section}/articles/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/app/swagger.json b/test/features/app/swagger.json index 598115c44..306a5d735 100644 --- a/test/features/app/swagger.json +++ b/test/features/app/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"oneOf":[{"type":"null"},{"type":"string","format":"uri"}]}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify-4/swagger.json b/test/features/beautify-4/swagger.json index 7c320d578..03b2cabfb 100644 --- a/test/features/beautify-4/swagger.json +++ b/test/features/beautify-4/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" @@ -96,7 +96,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], diff --git a/test/features/beautify-false/swagger.json b/test/features/beautify-false/swagger.json index 87ac2db79..49d855556 100644 --- a/test/features/beautify-false/swagger.json +++ b/test/features/beautify-false/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/beautify/swagger.json b/test/features/beautify/swagger.json index 3bc065f7a..4639462e5 100644 --- a/test/features/beautify/swagger.json +++ b/test/features/beautify/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" @@ -96,7 +96,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], diff --git a/test/features/body-config-assert/swagger.json b/test/features/body-config-assert/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-assert/swagger.json +++ b/test/features/body-config-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertClone/swagger.json b/test/features/body-config-assertClone/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-assertClone/swagger.json +++ b/test/features/body-config-assertClone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertEquals/swagger.json b/test/features/body-config-assertEquals/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-assertEquals/swagger.json +++ b/test/features/body-config-assertEquals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-assertPrune/swagger.json b/test/features/body-config-assertPrune/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-assertPrune/swagger.json +++ b/test/features/body-config-assertPrune/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-equals/swagger.json b/test/features/body-config-equals/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-equals/swagger.json +++ b/test/features/body-config-equals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-is/swagger.json b/test/features/body-config-is/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-is/swagger.json +++ b/test/features/body-config-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validate/swagger.json b/test/features/body-config-validate/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-validate/swagger.json +++ b/test/features/body-config-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validateClone/swagger.json b/test/features/body-config-validateClone/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-validateClone/swagger.json +++ b/test/features/body-config-validateClone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validateEquals/swagger.json b/test/features/body-config-validateEquals/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-validateEquals/swagger.json +++ b/test/features/body-config-validateEquals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-config-validatePrune/swagger.json b/test/features/body-config-validatePrune/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-config-validatePrune/swagger.json +++ b/test/features/body-config-validatePrune/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-generic-default/swagger.json b/test/features/body-generic-default/swagger.json index 2c5ed4d8f..a730a1c56 100644 --- a/test/features/body-generic-default/swagger.json +++ b/test/features/body-generic-default/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/google/{accountCode}/drives/images/upload/single":{"post":{"tags":["Google"],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"구글 계정명","required":true}],"requestBody":{"description":"단일 이미지 파일 업로드 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveImageSingleUpload"}}},"required":true},"responses":{"201":{"description":"업로드 완료된 구글 드라이브 파일 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveFile"}}}}},"summary":"단일 이미지 파일 업로드","description":"단일 이미지 파일 업로드.\n\n단 하나의 이미지 파일을 구글 드라이브에 개별 업로드한다."}},"/google/{accountCode}/drives/images/upload/activate":{"post":{"tags":[],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleTokenActivategoogle-authnever"}}},"required":true},"responses":{"201":{"description":""}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStorestring"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticlestring"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStorestring"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IGoogleDriveImageSingleUpload":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth-key","title":"구글 사용자 인증 키","description":"구글 사용자 인증 키.\n\n구글 드라이브에 이미지 파일을 업로드하기 위하여, 구글 사용자 인증이 선행되어야 한다.\n본 필드값에는, 바로 그 사전 인증하여 발급받은 사용자 인증 키를 할당해주어야 함.\n그리고 그 인증 키는, read 및 write scope 에 대하여 대응 가능하여야 한다."},"url":{"oneOf":[{"type":"string","format":"uri","contentMediaType":"image/png"},{"type":"string","format":"uri","contentMediaType":"image/jpg"}],"title":"이미지 파일 경로","description":"이미지 파일 경로.\n\nWorkflow Editor 상 Inspector 내지 Chat Agent 의 File Uploader 의하여 구성됨."},"location":{"type":"string","title":"파일 경로","description":"이미지 파일이 위치할 경로, 파일명 및 확장자는 제외."},"name":{"type":"string","x-wrtn-placeholder":"파일명을 입력해주세요.","title":"파일명","description":"파일명.\n\n확장자가 제외된, 순수 파일명.\n\n{@link url} 의 실제 파일명과 다르게 업로드 가능."},"extension":{"oneOf":[{"const":"jpg"},{"const":"png"}],"title":"이미지 확장자","description":"이미지 확장자."}},"required":["token","url","location","name","extension"],"description":"구글 드라이브에의 이미지 업로드 DTO.\n\n구글 드라이브에 단일 이미지를 업로드할 때 사용하는 DTO. 만일 복수의 이미지를\n동시에 업로드하고 싶다면, `IGoogleDriveImageMultipleUpload` DTO 및 관련\nAPI 함수를 사용하도록 할 것."},"IGoogleDriveFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"location":{"type":"string"},"name":{"type":"string"},"extension":{"oneOf":[{"type":"null"},{"type":"string"}]},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","location","name","extension","url","created_at","updated_at"]},"IGoogleTokenActivategoogle-authnever":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth"}},"required":["token"]},"IBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","format","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticlestring":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","format","files"]},"PartialIBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Google"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/google/{accountCode}/drives/images/upload/single":{"post":{"tags":["Google"],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"required":true,"description":" 구글 계정명"}],"requestBody":{"description":"단일 이미지 파일 업로드 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveImageSingleUpload"}}},"required":true},"responses":{"201":{"description":"업로드 완료된 구글 드라이브 파일 정보","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleDriveFile"}}}}},"summary":"단일 이미지 파일 업로드","description":"단일 이미지 파일 업로드.\n\n단 하나의 이미지 파일을 구글 드라이브에 개별 업로드한다."}},"/google/{accountCode}/drives/images/upload/activate":{"post":{"tags":[],"parameters":[{"name":"accountCode","in":"path","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IGoogleTokenActivategoogle-authnever"}}},"required":true},"responses":{"201":{"description":""}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStorestring"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticlestring"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStorestring"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IGoogleDriveImageSingleUpload":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth-key","title":"구글 사용자 인증 키","description":"구글 사용자 인증 키.\n\n구글 드라이브에 이미지 파일을 업로드하기 위하여, 구글 사용자 인증이 선행되어야 한다.\n본 필드값에는, 바로 그 사전 인증하여 발급받은 사용자 인증 키를 할당해주어야 함.\n그리고 그 인증 키는, read 및 write scope 에 대하여 대응 가능하여야 한다."},"url":{"oneOf":[{"type":"string","format":"uri","contentMediaType":"image/png"},{"type":"string","format":"uri","contentMediaType":"image/jpg"}],"title":"이미지 파일 경로","description":"이미지 파일 경로.\n\nWorkflow Editor 상 Inspector 내지 Chat Agent 의 File Uploader 의하여 구성됨."},"location":{"type":"string","title":"파일 경로","description":"이미지 파일이 위치할 경로, 파일명 및 확장자는 제외."},"name":{"type":"string","x-wrtn-placeholder":"파일명을 입력해주세요.","title":"파일명","description":"파일명.\n\n확장자가 제외된, 순수 파일명.\n\n{@link url} 의 실제 파일명과 다르게 업로드 가능."},"extension":{"oneOf":[{"const":"jpg"},{"const":"png"}],"title":"이미지 확장자","description":"이미지 확장자."}},"required":["token","url","location","name","extension"],"description":"구글 드라이브에의 이미지 업로드 DTO.\n\n구글 드라이브에 단일 이미지를 업로드할 때 사용하는 DTO. 만일 복수의 이미지를\n동시에 업로드하고 싶다면, `IGoogleDriveImageMultipleUpload` DTO 및 관련\nAPI 함수를 사용하도록 할 것."},"IGoogleDriveFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"location":{"type":"string"},"name":{"type":"string"},"extension":{"oneOf":[{"type":"null"},{"type":"string"}]},"url":{"type":"string","format":"uri"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","location","name","extension","url","created_at","updated_at"]},"IGoogleTokenActivategoogle-authnever":{"type":"object","properties":{"token":{"type":"string","x-wrtn-secret-key":"google-auth"}},"required":["token"]},"IBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","format","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticlestring":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","format","files"]},"PartialIBbsArticle.IStorestring":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"format":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"Google"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-assert/swagger.json b/test/features/body-manual-assert/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-manual-assert/swagger.json +++ b/test/features/body-manual-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-is/swagger.json b/test/features/body-manual-is/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-manual-is/swagger.json +++ b/test/features/body-manual-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body-manual-validate/swagger.json b/test/features/body-manual-validate/swagger.json index 0977dcc1f..18948a486 100644 --- a/test/features/body-manual-validate/swagger.json +++ b/test/features/body-manual-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/body/swagger.json b/test/features/body/swagger.json index 87ac2db79..49d855556 100644 --- a/test/features/body/swagger.json +++ b/test/features/body/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/body/{id}":{"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"PartialIBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-config-project/swagger.json b/test/features/cli-config-project/swagger.json index a0b775049..bbafdaea5 100644 --- a/test/features/cli-config-project/swagger.json +++ b/test/features/cli-config-project/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-config/swagger.json b/test/features/cli-config/swagger.json index a0b775049..bbafdaea5 100644 --- a/test/features/cli-config/swagger.json +++ b/test/features/cli-config/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":["system","health"],"parameters":[],"responses":{"200":{"description":""}},"summary":"Health check API","description":"Health check API.\n\nJust for health checking API liveness."}},"/performance":{"get":{"tags":["system","performance"],"parameters":[],"responses":{"200":{"description":"Performance info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}},"summary":"Get server performance info","description":"Get server performance info."}},"/body":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[{"name":"system"},{"name":"health"},{"name":"performance"}],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/cli-project/swagger.json b/test/features/cli-project/swagger.json index d17e31365..853819d8b 100644 --- a/test/features/cli-project/swagger.json +++ b/test/features/cli-project/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/clone-and-exact-optional-property/swagger.json b/test/features/clone-and-exact-optional-property/swagger.json index 78167a593..02f1d77c8 100644 --- a/test/features/clone-and-exact-optional-property/swagger.json +++ b/test/features/clone-and-exact-optional-property/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/partial-dto-test/original":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal"}}}}}}},"/partial-dto-test/partial-interface":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal.IPartialInterface"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPartialInterface"}}}}}}},"/partial-dto-test/partial-type":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"}}}}}}}},"components":{"schemas":{"IOriginal":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"c":{"type":"string"},"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"required":["a","b","c","d","email","created_at"]},"IOriginal.IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"c":{"type":"string"}}},"IPartialInterface":{"type":"object","properties":{"a":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}}},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"d":{"type":"string"}},"description":"Make all properties in T optional"},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"b":{"type":"string"}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/partial-dto-test/original":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal"}}}}}}},"/partial-dto-test/partial-interface":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOriginal.IPartialInterface"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPartialInterface"}}}}}}},"/partial-dto-test/partial-type":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb"}}}}}}}},"components":{"schemas":{"IOriginal":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"},"c":{"type":"string"},"d":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}},"required":["a","b","c","d","email","created_at"]},"IOriginal.IPartialInterface":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"c":{"type":"string"}}},"IPartialInterface":{"type":"object","properties":{"a":{"type":"string"},"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"}}},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrd":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"d":{"type":"string"}},"description":"Make all properties in T optional"},"PartialPickIOriginalemailcreated_atoriginal_optionalundefinable_attrb":{"type":"object","properties":{"email":{"oneOf":[{"type":"null"},{"type":"string","format":"email"}]},"created_at":{"oneOf":[{"type":"null"},{"type":"string","format":"date-time"}]},"original_optional":{"type":"boolean"},"undefinable_attr":{"type":"string"},"b":{"type":"string"}},"description":"Make all properties in T optional"}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/clone-and-propagate/src/api/functional/sellers/authenticate/index.ts b/test/features/clone-and-propagate/src/api/functional/sellers/authenticate/index.ts index b9a7645cc..d567e687b 100644 --- a/test/features/clone-and-propagate/src/api/functional/sellers/authenticate/index.ts +++ b/test/features/clone-and-propagate/src/api/functional/sellers/authenticate/index.ts @@ -217,7 +217,6 @@ export namespace login { /** * Erase the seller by itself. - * * @controller SellerAuthenticateController.exit * @path DELETE /sellers/authenticate/exit * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/clone-and-propagate/src/api/functional/users/oauth/index.ts b/test/features/clone-and-propagate/src/api/functional/users/oauth/index.ts index c7c2a442f..5dff2a9e1 100644 --- a/test/features/clone-and-propagate/src/api/functional/users/oauth/index.ts +++ b/test/features/clone-and-propagate/src/api/functional/users/oauth/index.ts @@ -19,6 +19,7 @@ import type { IAuthentication } from "../../../structures/IAuthentication"; /** * - When namespaced DTO type comes, `@nestia/sdk` had taken a mistake that writing only the deepest type even in the top or middle level namespaced types. * - When `clone` mode being used in SDK generator, it was not possible to clone recursive DTO type. + * * @throws 404 * * @controller UsersController.getOauthProfile diff --git a/test/features/clone-and-propagate/src/api/functional/users/user/index.ts b/test/features/clone-and-propagate/src/api/functional/users/user/index.ts index 9b22b7fc8..92afc8d63 100644 --- a/test/features/clone-and-propagate/src/api/functional/users/user/index.ts +++ b/test/features/clone-and-propagate/src/api/functional/users/user/index.ts @@ -23,6 +23,7 @@ import type { PartialPickIUseremailnamenullable_attroptional_attr } from "../../ * - When `clone` mode being used in SDK generator, it was not possible to clone recursive DTO type. * - check optional query DTO * - when use HttpCode decorator, sdk build fail code + * * @throws 404 * * @controller UsersController.getUserProfile @@ -118,7 +119,6 @@ export namespace getUserProfile { /** * - check optional, nullable property - * * @controller UsersController.updateUserProfile * @path POST /users/:user_id/user * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/clone-and-propagate/swagger.json b/test/features/clone-and-propagate/swagger.json index 30c47f350..21be03542 100644 --- a/test/features/clone-and-propagate/swagger.json +++ b/test/features/clone-and-propagate/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" @@ -72,7 +72,6 @@ "schema": { "type": "number" }, - "description": "", "required": true } ], @@ -160,7 +159,6 @@ "schema": { "type": "number" }, - "description": "", "required": true } ], @@ -251,7 +249,6 @@ "schema": { "type": "number" }, - "description": "", "required": true } ], @@ -324,7 +321,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], @@ -352,8 +348,8 @@ "schema": { "type": "string" }, - "description": "Target section", - "required": true + "required": true, + "description": " Target section" }, { "name": "page", @@ -410,8 +406,8 @@ "schema": { "type": "string" }, - "description": "Section code", - "required": true + "required": true, + "description": " Section code" } ], "requestBody": { @@ -451,8 +447,8 @@ "schema": { "type": "string" }, - "description": "Section code", - "required": true + "required": true, + "description": " Section code" }, { "name": "id", @@ -461,8 +457,8 @@ "type": "string", "format": "uuid" }, - "description": "Target article ID", - "required": true + "required": true, + "description": " Target article ID" } ], "requestBody": { @@ -658,7 +654,6 @@ "schema": { "type": "number" }, - "description": "", "required": true } ], @@ -927,7 +922,6 @@ "schema": { "type": "number" }, - "description": "", "required": true } ], @@ -1504,7 +1498,6 @@ "schema": { "type": "number" }, - "description": "", "required": true } ], @@ -1550,7 +1543,6 @@ "schema": { "type": "string" }, - "description": "", "required": true }, { @@ -1616,7 +1608,6 @@ "schema": { "type": "string" }, - "description": "", "required": true }, { @@ -1672,7 +1663,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], diff --git a/test/features/clone-implicit/swagger.json b/test/features/clone-implicit/swagger.json index 901f3c30c..6053ffa6f 100644 --- a/test/features/clone-implicit/swagger.json +++ b/test/features/clone-implicit/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" @@ -69,7 +69,6 @@ "type": "string", "format": "uuid" }, - "description": "", "required": true } ], diff --git a/test/features/clone-native/swagger.json b/test/features/clone-native/swagger.json index 09423ba19..0e78ebca8 100644 --- a/test/features/clone-native/swagger.json +++ b/test/features/clone-native/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git a/test/features/config-pattern/swagger.json b/test/features/config-pattern/swagger.json index d17e31365..853819d8b 100644 --- a/test/features/config-pattern/swagger.json +++ b/test/features/config-pattern/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/date/swagger.json b/test/features/date/swagger.json index 11843fe6b..6d8c1f92e 100644 --- a/test/features/date/swagger.json +++ b/test/features/date/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/date":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDateDefined"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IDateDefined":{"type":"object","properties":{"string":{"type":"string","format":"date-time"},"date":{"type":"string","format":"date-time"},"date_with_tag":{"type":"string","format":"date-time"},"date_but_union":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"type":{"const":"Buffer"},"data":{"type":"array","items":{"type":"number"}}},"required":["type","data"]}]}},"required":["string","date","date_with_tag","date_but_union"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/date":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDateDefined"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IDateDefined":{"type":"object","properties":{"string":{"type":"string","format":"date-time"},"date":{"type":"string","format":"date-time"},"date_with_tag":{"type":"string","format":"date-time"},"date_but_union":{"oneOf":[{"type":"string","format":"date-time"},{"type":"object","properties":{"type":{"const":"Buffer"},"data":{"type":"array","items":{"type":"number"}}},"required":["type","data"]}]}},"required":["string","date","date_with_tag","date_but_union"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert-json/packages/api/package.json b/test/features/distribute-assert-json/packages/api/package.json index 6487ac2c7..bb9b82dc7 100644 --- a/test/features/distribute-assert-json/packages/api/package.json +++ b/test/features/distribute-assert-json/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^6.0.0", + "rimraf": "^6.0.1", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.2" + "@nestia/fetcher": "^3.8.0-dev.20240722-2", + "typia": "^6.5.4" } } \ No newline at end of file diff --git a/test/features/distribute-assert-json/swagger.json b/test/features/distribute-assert-json/swagger.json index a4a693486..2de3223a5 100644 --- a/test/features/distribute-assert-json/swagger.json +++ b/test/features/distribute-assert-json/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ut](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nUpdated content","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}},"x-nestia-encrypted":true}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ut](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nUpdated content","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}},"x-nestia-encrypted":true}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-assert/packages/api/package.json b/test/features/distribute-assert/packages/api/package.json index 6487ac2c7..bb9b82dc7 100644 --- a/test/features/distribute-assert/packages/api/package.json +++ b/test/features/distribute-assert/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^6.0.0", + "rimraf": "^6.0.1", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.2" + "@nestia/fetcher": "^3.8.0-dev.20240722-2", + "typia": "^6.5.4" } } \ No newline at end of file diff --git a/test/features/distribute-assert/swagger.json b/test/features/distribute-assert/swagger.json index 890fd2764..1a95c7999 100644 --- a/test/features/distribute-assert/swagger.json +++ b/test/features/distribute-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute-json/packages/api/package.json b/test/features/distribute-json/packages/api/package.json index 6487ac2c7..bb9b82dc7 100644 --- a/test/features/distribute-json/packages/api/package.json +++ b/test/features/distribute-json/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^6.0.0", + "rimraf": "^6.0.1", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.2" + "@nestia/fetcher": "^3.8.0-dev.20240722-2", + "typia": "^6.5.4" } } \ No newline at end of file diff --git a/test/features/distribute-json/swagger.json b/test/features/distribute-json/swagger.json index 890fd2764..1a95c7999 100644 --- a/test/features/distribute-json/swagger.json +++ b/test/features/distribute-json/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/distribute/=6.5.4 b/test/features/distribute/=6.5.4 new file mode 100644 index 000000000..e69de29bb diff --git a/test/features/distribute/packages/api/package.json b/test/features/distribute/packages/api/package.json index 6487ac2c7..bb9b82dc7 100644 --- a/test/features/distribute/packages/api/package.json +++ b/test/features/distribute/packages/api/package.json @@ -27,12 +27,12 @@ "README.md" ], "devDependencies": { - "rimraf": "^6.0.0", + "rimraf": "^6.0.1", "ts-patch": "^3.2.1", "typescript": "^5.5.2" }, "dependencies": { - "@nestia/fetcher": "^3.5.0", - "typia": "^6.5.2" + "@nestia/fetcher": "^3.8.0-dev.20240722-2", + "typia": "^6.5.4" } } \ No newline at end of file diff --git a/test/features/distribute/swagger.json b/test/features/distribute/swagger.json index 890fd2764..1a95c7999 100644 --- a/test/features/distribute/swagger.json +++ b/test/features/distribute/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/duplicated/swagger.json b/test/features/duplicated/swagger.json index 24cb593d5..abdbb631d 100644 --- a/test/features/duplicated/swagger.json +++ b/test/features/duplicated/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/duplicated/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/multiple/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/duplicated/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/multiple/at":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/e2e/swagger.json b/test/features/e2e/swagger.json index 890fd2764..1a95c7999 100644 --- a/test/features/e2e/swagger.json +++ b/test/features/e2e/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/encrypted/src/api/functional/sellers/authenticate/index.ts b/test/features/encrypted/src/api/functional/sellers/authenticate/index.ts index 32b1402fb..8aac8a354 100644 --- a/test/features/encrypted/src/api/functional/sellers/authenticate/index.ts +++ b/test/features/encrypted/src/api/functional/sellers/authenticate/index.ts @@ -124,7 +124,6 @@ export namespace login { /** * Erase the seller by itself. - * * @controller SellerAuthenticateController.exit * @path DELETE /sellers/authenticate/exit * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/encrypted/swagger.json b/test/features/encrypted/swagger.json index 6d096590a..57477794b 100644 --- a/test/features/encrypted/swagger.json +++ b/test/features/encrypted/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722-2", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" diff --git a/test/features/exception-filter/swagger.json b/test/features/exception-filter/swagger.json index 095ac4d17..39eb885aa 100644 --- a/test/features/exception-filter/swagger.json +++ b/test/features/exception-filter/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/exception/typedBody":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/exception/typedManual":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/exception/{id}/typedParam":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true}],"responses":{"200":{"description":""}}}},"/exception/typedQuery":{"get":{"tags":[],"parameters":[{"name":"name","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"required":true},{"name":"extension","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"required":true},{"name":"url","in":"query","schema":{"type":"string","format":"uri"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAttachmentFile"}}}}}}},"/exception/internal":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/exception/typedBody":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/exception/typedManual":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/exception/{id}/typedParam":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":""}}}},"/exception/typedQuery":{"get":{"tags":[],"parameters":[{"name":"name","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"required":true},{"name":"extension","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"required":true},{"name":"url","in":"query","schema":{"type":"string","format":"uri"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IAttachmentFile"}}}}}}},"/exception/internal":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/exception-with-propagate/src/api/functional/fail/index.ts b/test/features/exception-with-propagate/src/api/functional/fail/index.ts index 2ccba5102..dbfe71298 100644 --- a/test/features/exception-with-propagate/src/api/functional/fail/index.ts +++ b/test/features/exception-with-propagate/src/api/functional/fail/index.ts @@ -9,7 +9,6 @@ import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; /** * @throws 401 - * * @controller FailController.get * @path GET /fail/:error_type * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -48,7 +47,6 @@ export namespace get { /** * @throws 401 - * * @controller FailController.composite * @path GET /fail/composite/:error_type * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/exception-with-propagate/src/api/functional/success/index.ts b/test/features/exception-with-propagate/src/api/functional/success/index.ts index 54faa08de..6485d8725 100644 --- a/test/features/exception-with-propagate/src/api/functional/success/index.ts +++ b/test/features/exception-with-propagate/src/api/functional/success/index.ts @@ -9,7 +9,6 @@ import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; /** * @throws 401 - * * @controller SuccessController.get * @path GET /success * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -43,7 +42,6 @@ export namespace get { /** * @throws 401 - * * @controller SuccessController.union * @path GET /success/:error_type * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/exception-with-propagate/swagger.json b/test/features/exception-with-propagate/swagger.json index 7ff19b0a0..f9dc57515 100644 --- a/test/features/exception-with-propagate/swagger.json +++ b/test/features/exception-with-propagate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/success":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"const":"INVALID_PERMISSION"}}}}}}},"/success/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}},"/fail/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]}}}}}}},"/fail/composite/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/success":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"const":"INVALID_PERMISSION"}}}}}}},"/success/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}},"/fail/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"}]}}}}}}},"/fail/composite/{error_type}":{"get":{"tags":[],"parameters":[{"name":"error_type","in":"path","schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}},"401":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"INVALID_PERMISSION"},{"const":"EXPIRED_PERMISSION"},{"const":"REQUIRED_PERMISSION"}]}}}}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/exception/src/api/functional/exception/index.ts b/test/features/exception/src/api/functional/exception/index.ts index 5fe53a528..944c67e98 100644 --- a/test/features/exception/src/api/functional/exception/index.ts +++ b/test/features/exception/src/api/functional/exception/index.ts @@ -16,7 +16,6 @@ import type { IUnprocessibleEntity } from "../../structures/IUnprocessibleEntity * @throws 404 unable to find the matched section * @throws 428 * @throws 5XX internal server error - * * @controller ExceptionController.typed * @path POST /exception/:section/typed * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -66,7 +65,6 @@ export namespace typed { /** * @throws 428 unable to process the request - * * @controller ExceptionController.union * @path GET /exception/:section/union * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -102,12 +100,10 @@ export namespace union { } /** - * * @throws 400 invalid request * @throws 404 unable to find the matched section * @throw 428 unable to process the request * @throw 5XX internal server error - * * @controller ExceptionController.tags * @path POST /exception/:section/tags * @nestia Generated by Nestia - https://github.com/samchon/nestia @@ -156,12 +152,10 @@ export namespace tags { } /** - * * @throws 400 invalid request * @throws 404 unable to find the matched section * @throw 428 unable to process the request * @throw 5XX internal server error - * * @controller ExceptionController.composite * @path POST /exception/:section/composite * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/exception/swagger.json b/test/features/exception/swagger.json index 2ab65ced4..cdf62b924 100644 --- a/test/features/exception/swagger.json +++ b/test/features/exception/swagger.json @@ -7,8 +7,8 @@ } ], "info": { - "version": "3.5.0", - "title": "@nestia/test", + "version": "3.8.0-dev.20240722-2", + "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { "name": "MIT" @@ -25,7 +25,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], @@ -103,7 +102,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], @@ -161,7 +159,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], @@ -231,7 +228,6 @@ "schema": { "type": "string" }, - "description": "", "required": true } ], diff --git a/test/features/fastify/src/api/functional/sellers/authenticate/index.ts b/test/features/fastify/src/api/functional/sellers/authenticate/index.ts index 32b1402fb..8aac8a354 100644 --- a/test/features/fastify/src/api/functional/sellers/authenticate/index.ts +++ b/test/features/fastify/src/api/functional/sellers/authenticate/index.ts @@ -124,7 +124,6 @@ export namespace login { /** * Erase the seller by itself. - * * @controller SellerAuthenticateController.exit * @path DELETE /sellers/authenticate/exit * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/fastify/swagger.json b/test/features/fastify/swagger.json index 369cc62c8..9951bfac6 100644 --- a/test/features/fastify/swagger.json +++ b/test/features/fastify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article ID","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles/{section}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/articles/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}},"/param/{value}/boolean":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"boolean"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}}}},"/param/{value}/number":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"number"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"number"}}}}}}},"/param/{value}/string":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/param/{value}/nullable":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"type":"string"}]}}}}}}},"/param/{value}/literal":{"get":{"tags":[],"parameters":[{"name":"value","in":"path","schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/headers-decompose/swagger.json b/test/features/headers-decompose/swagger.json index 7e906f006..e50ce3c0a 100644 --- a/test/features/headers-decompose/swagger.json +++ b/test/features/headers-decompose/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-name":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-flags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-flags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-name","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-flags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-name":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-flags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-flags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/headers/swagger.json b/test/features/headers/swagger.json index 42a193c8d..19d81162e 100644 --- a/test/features/headers/swagger.json +++ b/test/features/headers/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@nestia/test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-nAme","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-fLags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"","required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-nAme","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-fLags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Store article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"description":"Target section code","required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"description":"Target article id","required":true},{"name":"x-name","in":"header","schema":{"type":"string"},"description":"Name in header for authentication","required":true}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-nAme":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-fLags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-fLags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/headers/{section}":{"patch":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-nAme","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-fLags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IHeaders"}}}}}},"post":{"tags":[],"parameters":[{"name":"x-category","in":"header","schema":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"required":true},{"name":"x-memo","in":"header","schema":{"type":"string"},"required":false},{"name":"x-nAme","in":"header","schema":{"type":"string"},"required":false},{"name":"x-values","in":"header","schema":{"type":"array","items":{"type":"number"}},"required":true},{"name":"x-fLags","in":"header","schema":{"type":"array","items":{"type":"boolean"}},"required":true},{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Target section code"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Store article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/headers/{section}/{id}":{"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Target section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article id"},{"name":"x-name","in":"header","schema":{"type":"string"},"required":true,"description":" Name in header for authentication"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":""}},"summary":"Update an article","description":"Update an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IHeaders":{"type":"object","properties":{"x-category":{"oneOf":[{"const":"x"},{"const":"y"},{"const":"z"}]},"x-memo":{"type":"string"},"x-nAme":{"type":"string"},"x-values":{"type":"array","items":{"type":"number"}},"x-fLags":{"type":"array","items":{"type":"boolean"}}},"required":["x-category","x-values","x-fLags"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/ignore/src/api/functional/bbs/articles/index.ts b/test/features/ignore/src/api/functional/bbs/articles/index.ts index 236b1dff8..7f1894336 100644 --- a/test/features/ignore/src/api/functional/bbs/articles/index.ts +++ b/test/features/ignore/src/api/functional/bbs/articles/index.ts @@ -63,9 +63,7 @@ export namespace store { } /** - * * @internal - * * @controller BbsArticlesController.update * @path PUT /bbs/articles/:id * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/ignore/swagger.json b/test/features/ignore/swagger.json index d6fd35108..66ea6da7f 100644 --- a/test/features/ignore/swagger.json +++ b/test/features/ignore/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"post":{"deprecated":true,"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"post":{"deprecated":true,"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/kebab/swagger.json b/test/features/kebab/swagger.json index 958a041d7..ce08108ee 100644 --- a/test/features/kebab/swagger.json +++ b/test/features/kebab/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/ke-bab-with-dashes":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/ke-bab-with-dashes":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/method/swagger.json b/test/features/method/swagger.json index 5a4a477c7..460663a15 100644 --- a/test/features/method/swagger.json +++ b/test/features/method/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/method/head":{"head":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/method/head":{"head":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/migrate/swagger.json b/test/features/migrate/swagger.json index 271024088..cd22743cc 100644 --- a/test/features/migrate/swagger.json +++ b/test/features/migrate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.7.1","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/articles":{"patch":{"tags":[],"parameters":[{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.ICreate"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store an article","description":"Store an article."}},"/bbs/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialIBbsArticle.ICreate"}}},"required":true},"responses":{"200":{"description":""}}}},"/multipart":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/IMultipart"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IMultipart.IContent"}}}}}}},"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"},"minItems":1},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"PartialIBbsArticle.ICreate":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"description":"Make all properties in T optional"},"IMultipart":{"type":"object","properties":{"title":{"type":"string"},"blob":{"type":"string","format":"binary"},"blobs":{"type":"array","items":{"type":"string","format":"binary"}},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"file":{"type":"string","format":"binary"},"flags":{"type":"array","items":{"type":"number"}},"files":{"type":"array","items":{"type":"string","format":"binary"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","blob","blobs","description","file","flags","files"]},"IMultipart.IContent":{"type":"object","properties":{"title":{"type":"string"},"description":{"oneOf":[{"type":"null"},{"type":"string"}]},"flags":{"type":"array","items":{"type":"number"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["title","description","flags"]},"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/multipart-form-data-fastify/swagger.json b/test/features/multipart-form-data-fastify/swagger.json index ecf75f648..16b9b6cea 100644 --- a/test/features/multipart-form-data-fastify/swagger.json +++ b/test/features/multipart-form-data-fastify/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.5.0", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { diff --git a/test/features/multipart-form-data/swagger.json b/test/features/multipart-form-data/swagger.json index ecf75f648..16b9b6cea 100644 --- a/test/features/multipart-form-data/swagger.json +++ b/test/features/multipart-form-data/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.5.0", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { diff --git a/test/features/non-equals/swagger.json b/test/features/non-equals/swagger.json index d6423ae0c..38d12f117 100644 --- a/test/features/non-equals/swagger.json +++ b/test/features/non-equals/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/request":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IRequestDto":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}},"required":["a","b"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/request":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IRequestDto"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IRequestDto":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"string"}},"required":["a","b"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/openai-keyword-separate/nestia.config.ts b/test/features/openai-keyword-separate/nestia.config.ts new file mode 100644 index 000000000..a6b23e050 --- /dev/null +++ b/test/features/openai-keyword-separate/nestia.config.ts @@ -0,0 +1,15 @@ +import { INestiaConfig } from "@nestia/sdk"; +import { OpenAiTypeChecker } from "@wrtnio/openai-function-schema"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + openai: { + output: "./openai.json", + beautify: true, + keyword: true, + separate: (schema) => + OpenAiTypeChecker.isString(schema) && + !!schema.contentMediaType?.startsWith("image/"), + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/openai-keyword-separate/openai.json b/test/features/openai-keyword-separate/openai.json new file mode 100644 index 000000000..50c606ab3 --- /dev/null +++ b/test/features/openai-keyword-separate/openai.json @@ -0,0 +1,1266 @@ +{ + "openapi": "3.0.3", + "functions": [ + { + "method": "post", + "path": "/bbs/articles", + "name": "bbs_articles_post", + "parameters": [ + { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "writer", + "format", + "title", + "body", + "files", + "password" + ], + "description": "Store content type of the article." + } + } + } + ], + "separated": { + "llm": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + } + }, + "required": [ + "name", + "extension" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "writer", + "format", + "title", + "body", + "files", + "password" + ], + "description": "Store content type of the article." + } + } + } + } + ], + "human": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "files" + ], + "description": "Store content type of the article." + } + } + } + } + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of article", + "description": "Writer of article." + }, + "snapshots": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "minItems": 1, + "title": "List of snapshot contents", + "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of article", + "description": "Creation time of article." + } + }, + "required": [ + "id", + "writer", + "snapshots", + "created_at" + ], + "description": "Article entity.\n\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\nbackend system, literally shaping individual articles of the bulletin board.\n\nAnd, as you can see, the elements that must inevitably exist in the article,\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\nin the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship,\nwhich is because a new snapshot record is published every time the article is\nmodified.\n\nThe reason why a new snapshot record is published every time the article is\nmodified is to preserve the evidence. Due to the nature of e-community, there\nis always a threat of dispute among the participants. And it can happen that\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\nprevent such things as modifying existing articles to manipulate the situation,\nthe article is designed in this structure.\n\nIn other words, to keep evidence, and prevent fraud." + }, + "description": "Create a new article.\n\nCreate a new article with its first {@link IBbsArticle.ISnapshot snapshot}." + }, + { + "method": "patch", + "path": "/bbs/articles", + "name": "bbs_articles_patch", + "parameters": [ + { + "type": "object", + "properties": { + "query": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + }, + "required": [] + } + } + } + ], + "separated": { + "llm": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "query": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + }, + "required": [] + } + } + } + } + ], + "human": [] + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "title": "Current page number", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + }, + "records": { + "type": "integer", + "title": "Total records in the database", + "description": "Total records in the database." + }, + "pages": { + "type": "integer", + "title": "Total pages", + "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." + } + }, + "required": [ + "current", + "limit", + "records", + "pages" + ], + "description": "Page information." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of the article", + "description": "Writer of the article." + }, + "title": { + "type": "string", + "title": "Title of the last snapshot", + "description": "Title of the last snapshot." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of the article", + "description": "Creation time of the article." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Modification time of the article", + "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." + } + }, + "required": [ + "id", + "writer", + "title", + "created_at", + "updated_at" + ], + "description": "Summarized information of the article." + }, + "title": "List of records", + "description": "List of records." + } + }, + "required": [ + "pagination", + "data" + ], + "description": "A page.\n\nCollection of records with pagination indformation." + }, + "description": "List up all summarized articles.\n\nList up all summarized articles with pagination and searching options." + }, + { + "method": "patch", + "path": "/bbs/articles/abridges", + "name": "bbs_articles_abridges_patch", + "parameters": [ + { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "search": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "title_or_body": { + "type": "string" + }, + "from": { + "type": "string", + "format": "date-time" + }, + "to": { + "type": "string", + "format": "date-time" + } + }, + "description": "검색 정보." + }, + "sort": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "-title", + "-writer", + "-created_at", + "-updated_at", + "+title", + "+writer", + "+created_at", + "+updated_at" + ] + }, + "title": "Sort condition", + "description": "Sort condition." + }, + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + } + } + } + } + ], + "separated": { + "llm": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "search": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "title_or_body": { + "type": "string" + }, + "from": { + "type": "string", + "format": "date-time" + }, + "to": { + "type": "string", + "format": "date-time" + } + }, + "description": "검색 정보." + }, + "sort": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "-title", + "-writer", + "-created_at", + "-updated_at", + "+title", + "+writer", + "+created_at", + "+updated_at" + ] + }, + "title": "Sort condition", + "description": "Sort condition." + }, + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + } + } + } + } + } + ], + "human": [] + }, + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "title": "Current page number", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + }, + "records": { + "type": "integer", + "title": "Total records in the database", + "description": "Total records in the database." + }, + "pages": { + "type": "integer", + "title": "Total pages", + "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." + } + }, + "required": [ + "current", + "limit", + "records", + "pages" + ], + "description": "Page information." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of the article", + "description": "Writer of the article." + }, + "title": { + "type": "string", + "title": "Title of the last snapshot", + "description": "Title of the last snapshot." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of the article", + "description": "Creation time of the article." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Modification time of the article", + "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "writer", + "title", + "created_at", + "updated_at", + "format", + "body", + "files" + ], + "description": "Abriged information of the article." + }, + "title": "List of records", + "description": "List of records." + } + }, + "required": [ + "pagination", + "data" + ], + "description": "A page.\n\nCollection of records with pagination indformation." + }, + "description": "List up all abridged articles.\n\nList up all abridged articles with pagination and searching options." + }, + { + "method": "get", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_getById", + "parameters": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + } + } + } + ], + "separated": { + "llm": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + } + } + } + } + ], + "human": [] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of article", + "description": "Writer of article." + }, + "snapshots": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "minItems": 1, + "title": "List of snapshot contents", + "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of article", + "description": "Creation time of article." + } + }, + "required": [ + "id", + "writer", + "snapshots", + "created_at" + ], + "description": "Article entity.\n\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\nbackend system, literally shaping individual articles of the bulletin board.\n\nAnd, as you can see, the elements that must inevitably exist in the article,\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\nin the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship,\nwhich is because a new snapshot record is published every time the article is\nmodified.\n\nThe reason why a new snapshot record is published every time the article is\nmodified is to preserve the evidence. Due to the nature of e-community, there\nis always a threat of dispute among the participants. And it can happen that\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\nprevent such things as modifying existing articles to manipulate the situation,\nthe article is designed in this structure.\n\nIn other words, to keep evidence, and prevent fraud." + }, + "description": "Read individual article.\n\nReads an article with its every {@link IBbsArticle.ISnapshot snapshots}." + }, + { + "method": "put", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_putById", + "parameters": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + "body": { + "type": "object", + "properties": { + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "format", + "title", + "body", + "files", + "password" + ] + } + } + } + ], + "separated": { + "llm": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + "body": { + "type": "object", + "properties": { + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + } + }, + "required": [ + "name", + "extension" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "format", + "title", + "body", + "files", + "password" + ] + } + } + } + } + ], + "human": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "files" + ] + } + } + } + } + ] + }, + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "description": "Update an article.\n\nAccumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article." + }, + { + "method": "delete", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_eraseById", + "parameters": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + "body": { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + } + } + } + ], + "separated": { + "llm": [ + { + "index": 0, + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + "body": { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + } + } + } + } + ], + "human": [] + }, + "description": "Erase an article.\n\nPerforms soft deletion to the article." + } + ], + "errors": [], + "options": { + "keyword": true + } +} \ No newline at end of file diff --git a/test/features/openai-keyword-separate/src/Backend.ts b/test/features/openai-keyword-separate/src/Backend.ts new file mode 100644 index 000000000..fc5f679b2 --- /dev/null +++ b/test/features/openai-keyword-separate/src/Backend.ts @@ -0,0 +1,25 @@ +import core from "@nestia/core"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; +import { Singleton } from "tstl"; + +export class Backend { + public readonly application: Singleton> = + new Singleton(async () => + NestFactory.create( + await core.EncryptedModule.dynamic(__dirname + "/controllers", { + key: "A".repeat(32), + iv: "B".repeat(16), + }), + { logger: false }, + ), + ); + + public async open(): Promise { + return (await this.application.get()).listen(37_000); + } + + public async close(): Promise { + return (await this.application.get()).close(); + } +} diff --git a/test/features/openai-keyword-separate/src/api/structures/IAttachmentFile.ts b/test/features/openai-keyword-separate/src/api/structures/IAttachmentFile.ts new file mode 100644 index 000000000..1f6b693cf --- /dev/null +++ b/test/features/openai-keyword-separate/src/api/structures/IAttachmentFile.ts @@ -0,0 +1,41 @@ +import { tags } from "typia"; + +/** + * Attachment File. + * + * Every attachment files that are managed in current system. + * + * @author Samchon + */ +export interface IAttachmentFile extends IAttachmentFile.ICreate { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of attachment file. + */ + created_at: string & tags.Format<"date-time">; +} + +export namespace IAttachmentFile { + export interface ICreate { + /** + * File name, except extension. + */ + name: string & tags.MaxLength<255>; + + /** + * Extension. + * + * Possible to omit like `README` case. + */ + extension: null | (string & tags.MinLength<1> & tags.MaxLength<8>); + + /** + * URL path of the real file. + */ + url: string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">; + } +} diff --git a/test/features/openai-keyword-separate/src/api/structures/IBbsArticle.ts b/test/features/openai-keyword-separate/src/api/structures/IBbsArticle.ts new file mode 100644 index 000000000..83f8d2718 --- /dev/null +++ b/test/features/openai-keyword-separate/src/api/structures/IBbsArticle.ts @@ -0,0 +1,196 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; +import { IPage } from "./IPage"; + +/** + * Article entity. + * + * `IBbsArticle* is a super-type entity of all kinds of articles in the current + * backend system, literally shaping individual articles of the bulletin board. + * + * And, as you can see, the elements that must inevitably exist in the article, + * such as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist + * in the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship, + * which is because a new snapshot record is published every time the article is + * modified. + * + * The reason why a new snapshot record is published every time the article is + * modified is to preserve the evidence. Due to the nature of e-community, there + * is always a threat of dispute among the participants. And it can happen that + * disputes arise through articles or {@link IBbsArticleComment comments}, and to + * prevent such things as modifying existing articles to manipulate the situation, + * the article is designed in this structure. + * + * In other words, to keep evidence, and prevent fraud. + * + * @template Snapshot Snapshot content type of the article + * @author Samchon + */ +export interface IBbsArticle { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Writer of article. + */ + writer: string; + + /** + * List of snapshot contents. + * + * It is created for the first time when an article is created, and is + * accumulated every time the article is modified. + */ + snapshots: IBbsArticle.ISnapshot[] & tags.MinItems<1>; + + /** + * Creation time of article. + */ + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsArticle { + export type Format = "txt" | "md" | "html"; + + /** + * Snapshot of article. + * + * `IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of + * the article, as mentioned in {@link IBbsArticle}, the contents of the article + * are separated from the article record to keep evidence and prevent fraud. + */ + export interface ISnapshot extends Omit { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of snapshot record. + * + * In other words, creation time or update time or article. + */ + created_at: string & tags.Format<"date-time">; + } + + export interface IRequest extends IPage.IRequest { + /** + * Search condition. + */ + search?: IRequest.ISearch; + + /** + * Sort condition. + */ + sort?: IPage.Sort; + } + export namespace IRequest { + /** + * 검색 정보. + */ + export interface ISearch { + writer?: string; + title?: string; + body?: string; + title_or_body?: string; + + /** + * @format date-time + */ + from?: string; + + /** + * @format date-time + */ + to?: string; + } + + /** + * Sortable columns of {@link IBbsArticle}. + */ + export type SortableColumns = + | "writer" + | "title" + | "created_at" + | "updated_at"; + } + + /** + * Summarized information of the article. + */ + export interface ISummary { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Writer of the article. + */ + writer: string; + + /** + * Title of the last snapshot. + */ + title: string; + + /** + * Creation time of the article. + */ + created_at: string & tags.Format<"date-time">; + + /** + * Modification time of the article. + * + * In other words, the time when the last snapshot was created. + */ + updated_at: string & tags.Format<"date-time">; + } + + /** + * Abriged information of the article. + */ + export interface IAbridge extends ISummary, Omit {} + + /** + * Store content type of the article. + */ + export interface ICreate extends IUpdate { + writer: string; + } + + export interface IUpdate { + /** + * Format of body. + * + * Same meaning with extension like `html`, `md`, `txt`. + */ + format: Format; + + /** + * Title of article. + */ + title: string; + + /** + * Content body of article. + */ + body: string; + + /** + * List of attachment files. + */ + files: IAttachmentFile.ICreate[]; + + /** + * Password for modification. + */ + password: string; + } + + export interface IErase { + password: string; + } +} diff --git a/test/features/openai-keyword-separate/src/api/structures/IPage.ts b/test/features/openai-keyword-separate/src/api/structures/IPage.ts new file mode 100644 index 000000000..e02d83140 --- /dev/null +++ b/test/features/openai-keyword-separate/src/api/structures/IPage.ts @@ -0,0 +1,77 @@ +import { tags } from "typia"; + +/** + * A page. + * + * Collection of records with pagination indformation. + * + * @template T Record type + * @author Samchon + */ +export interface IPage { + /** + * Page information. + */ + pagination: IPage.IPagination; + + /** + * List of records. + */ + data: T[]; +} +export namespace IPage { + /** + * Page information. + */ + export interface IPagination { + /** + * Current page number. + */ + current: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit: number & tags.Type<"uint32">; + + /** + * Total records in the database. + */ + records: number & tags.Type<"uint32">; + + /** + * Total pages. + * + * Equal to {@link records} / {@link limit} with ceiling. + */ + pages: number & tags.Type<"uint32">; + } + + /** + * Page request data + */ + export interface IRequest { + /** + * Page number. + */ + page?: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit?: number & tags.Type<"uint32">; + } + + /** + * Sorting column specialization. + * + * The plus means ascending order and the minus means descending order. + */ + export type Sort = Array< + `-${Literal}` | `+${Literal}` + >; +} diff --git a/test/features/openai-keyword-separate/src/controllers/BbsArticleController.ts b/test/features/openai-keyword-separate/src/controllers/BbsArticleController.ts new file mode 100644 index 000000000..80ca5ce48 --- /dev/null +++ b/test/features/openai-keyword-separate/src/controllers/BbsArticleController.ts @@ -0,0 +1,122 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import { request } from "http"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller("bbs/articles") +export class BbsArticleController { + /** + * List up all summarized articles. + * + * List up all summarized articles with pagination and searching options. + * + * @param input Request info of pagination and searching options. + * @returns Paginated summarized articles. + * @author Samchon + */ + @core.TypedRoute.Patch() + public async index( + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + query; + return typia.random>(); + } + + /** + * List up all abridged articles. + * + * List up all abridged articles with pagination and searching options. + * + * @param input Request info of pagination and searching options. + * @returns Paginated abridged articles. + * @author Samchon + */ + @core.TypedRoute.Patch("abridges") + public async abridges( + @core.TypedBody() input: IBbsArticle.IRequest, + ): Promise> { + input; + return typia.random>(); + } + + /** + * Read individual article. + * + * Reads an article with its every {@link IBbsArticle.ISnapshot snapshots}. + * + * @param id Target article's {@link IBbsArticle.id} + * @returns Article information + * @author Samchon + */ + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + return { + ...typia.random(), + id, + }; + } + + /** + * Create a new article. + * + * Create a new article with its first {@link IBbsArticle.ISnapshot snapshot}. + * + * @param input Article information to create. + * @returns Newly created article. + * @author Samchon + */ + @core.TypedRoute.Post() + public async create( + @core.TypedBody() input: IBbsArticle.ICreate, + ): Promise { + request; + const output: IBbsArticle = { + ...typia.random(), + ...input, + }; + return output; + } + + /** + * Update an article. + * + * Accumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article. + * + * @param id Target article's {@link IBbsArticle.id} + * @param input Article information to update. + * @returns Newly accumulated snapshot information. + * @author Samchon + */ + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IUpdate, + ): Promise { + id; + input; + return typia.random(); + } + + /** + * Erase an article. + * + * Performs soft deletion to the article. + * + * @param id Target article's {@link IBbsArticle.id} + * @param input Password of the article. + * @author Samchon + */ + @core.TypedRoute.Delete(":id") + public async erase( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IErase, + ): Promise { + id; + input; + } +} diff --git a/test/features/openai-keyword-separate/src/test/features/api/test_openai_document.ts b/test/features/openai-keyword-separate/src/test/features/api/test_openai_document.ts new file mode 100644 index 000000000..eaf1bbb09 --- /dev/null +++ b/test/features/openai-keyword-separate/src/test/features/api/test_openai_document.ts @@ -0,0 +1,61 @@ +import { TestValidator } from "@nestia/e2e"; +import { IOpenAiDocument, IOpenAiSchema } from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import typia from "typia"; + +export const test_openai_document = async (): Promise => { + const document: IOpenAiDocument = JSON.parse( + await fs.promises.readFile(`${__dirname}/../../../../openai.json`, "utf8"), + ); + typia.assert(document); + + TestValidator.equals("options")(document.options)({ + keyword: true, + separate: undefined!, + }); + TestValidator.equals("parameters")( + document.functions + .find( + (func) => func.path === "/bbs/articles/{id}" && func.method === "put", + ) + ?.parameters.map((p) => (p as IOpenAiSchema.IObject).type), + )(["object"]); + TestValidator.equals("separated.human")( + document.functions.find( + (func) => func.path === "/bbs/articles/{id}" && func.method === "put", + )?.separated?.human, + )([ + { + index: 0, + schema: { + type: "object", + properties: { + body: { + type: "object", + properties: { + files: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + format: "uri", + contentMediaType: "image/*", + title: "URL path of the real file", + description: "URL path of the real file.", + }, + }, + required: ["url"], + }, + title: "List of attachment files", + description: "List of attachment files.", + }, + }, + required: ["files"], + }, + }, + }, + }, + ]); +}; diff --git a/test/features/openai-keyword-separate/src/test/index.ts b/test/features/openai-keyword-separate/src/test/index.ts new file mode 100644 index 000000000..fd4b1c3c4 --- /dev/null +++ b/test/features/openai-keyword-separate/src/test/index.ts @@ -0,0 +1,41 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + location: `${__dirname}/features`, + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + }); + await server.close(); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/openai-keyword-separate/tsconfig.json b/test/features/openai-keyword-separate/tsconfig.json new file mode 100644 index 000000000..afe2540b1 --- /dev/null +++ b/test/features/openai-keyword-separate/tsconfig.json @@ -0,0 +1,99 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + }, + "include": ["src"], + } \ No newline at end of file diff --git a/test/features/openai-keyword/nestia.config.ts b/test/features/openai-keyword/nestia.config.ts new file mode 100644 index 000000000..1e0383f18 --- /dev/null +++ b/test/features/openai-keyword/nestia.config.ts @@ -0,0 +1,11 @@ +import { INestiaConfig } from "@nestia/sdk"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + openai: { + output: "./openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/openai-keyword/openai.json b/test/features/openai-keyword/openai.json new file mode 100644 index 000000000..73b133855 --- /dev/null +++ b/test/features/openai-keyword/openai.json @@ -0,0 +1,878 @@ +{ + "openapi": "3.0.3", + "functions": [ + { + "method": "post", + "path": "/bbs/articles", + "name": "bbs_articles_post", + "parameters": [ + { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "writer", + "format", + "title", + "body", + "files", + "password" + ], + "description": "Store content type of the article." + } + } + } + ], + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of article", + "description": "Writer of article." + }, + "snapshots": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "minItems": 1, + "title": "List of snapshot contents", + "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of article", + "description": "Creation time of article." + } + }, + "required": [ + "id", + "writer", + "snapshots", + "created_at" + ], + "description": "Article entity.\n\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\nbackend system, literally shaping individual articles of the bulletin board.\n\nAnd, as you can see, the elements that must inevitably exist in the article,\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\nin the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship,\nwhich is because a new snapshot record is published every time the article is\nmodified.\n\nThe reason why a new snapshot record is published every time the article is\nmodified is to preserve the evidence. Due to the nature of e-community, there\nis always a threat of dispute among the participants. And it can happen that\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\nprevent such things as modifying existing articles to manipulate the situation,\nthe article is designed in this structure.\n\nIn other words, to keep evidence, and prevent fraud." + }, + "description": "Create a new article.\n\nCreate a new article with its first {@link IBbsArticle.ISnapshot snapshot}." + }, + { + "method": "patch", + "path": "/bbs/articles", + "name": "bbs_articles_patch", + "parameters": [ + { + "type": "object", + "properties": { + "query": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + }, + "required": [] + } + } + } + ], + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "title": "Current page number", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + }, + "records": { + "type": "integer", + "title": "Total records in the database", + "description": "Total records in the database." + }, + "pages": { + "type": "integer", + "title": "Total pages", + "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." + } + }, + "required": [ + "current", + "limit", + "records", + "pages" + ], + "description": "Page information." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of the article", + "description": "Writer of the article." + }, + "title": { + "type": "string", + "title": "Title of the last snapshot", + "description": "Title of the last snapshot." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of the article", + "description": "Creation time of the article." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Modification time of the article", + "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." + } + }, + "required": [ + "id", + "writer", + "title", + "created_at", + "updated_at" + ], + "description": "Summarized information of the article." + }, + "title": "List of records", + "description": "List of records." + } + }, + "required": [ + "pagination", + "data" + ], + "description": "A page.\n\nCollection of records with pagination indformation." + }, + "description": "List up all summarized articles.\n\nList up all summarized articles with pagination and searching options." + }, + { + "method": "patch", + "path": "/bbs/articles/abridges", + "name": "bbs_articles_abridges_patch", + "parameters": [ + { + "type": "object", + "properties": { + "body": { + "type": "object", + "properties": { + "search": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "title_or_body": { + "type": "string" + }, + "from": { + "type": "string", + "format": "date-time" + }, + "to": { + "type": "string", + "format": "date-time" + } + }, + "description": "검색 정보." + }, + "sort": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "-title", + "-writer", + "-created_at", + "-updated_at", + "+title", + "+writer", + "+created_at", + "+updated_at" + ] + }, + "title": "Sort condition", + "description": "Sort condition." + }, + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + } + } + } + } + ], + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "title": "Current page number", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + }, + "records": { + "type": "integer", + "title": "Total records in the database", + "description": "Total records in the database." + }, + "pages": { + "type": "integer", + "title": "Total pages", + "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." + } + }, + "required": [ + "current", + "limit", + "records", + "pages" + ], + "description": "Page information." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of the article", + "description": "Writer of the article." + }, + "title": { + "type": "string", + "title": "Title of the last snapshot", + "description": "Title of the last snapshot." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of the article", + "description": "Creation time of the article." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Modification time of the article", + "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "writer", + "title", + "created_at", + "updated_at", + "format", + "body", + "files" + ], + "description": "Abriged information of the article." + }, + "title": "List of records", + "description": "List of records." + } + }, + "required": [ + "pagination", + "data" + ], + "description": "A page.\n\nCollection of records with pagination indformation." + }, + "description": "List up all abridged articles.\n\nList up all abridged articles with pagination and searching options." + }, + { + "method": "get", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_getById", + "parameters": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + } + } + } + ], + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of article", + "description": "Writer of article." + }, + "snapshots": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "minItems": 1, + "title": "List of snapshot contents", + "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of article", + "description": "Creation time of article." + } + }, + "required": [ + "id", + "writer", + "snapshots", + "created_at" + ], + "description": "Article entity.\n\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\nbackend system, literally shaping individual articles of the bulletin board.\n\nAnd, as you can see, the elements that must inevitably exist in the article,\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\nin the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship,\nwhich is because a new snapshot record is published every time the article is\nmodified.\n\nThe reason why a new snapshot record is published every time the article is\nmodified is to preserve the evidence. Due to the nature of e-community, there\nis always a threat of dispute among the participants. And it can happen that\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\nprevent such things as modifying existing articles to manipulate the situation,\nthe article is designed in this structure.\n\nIn other words, to keep evidence, and prevent fraud." + }, + "description": "Read individual article.\n\nReads an article with its every {@link IBbsArticle.ISnapshot snapshots}." + }, + { + "method": "put", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_putById", + "parameters": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + "body": { + "type": "object", + "properties": { + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "format", + "title", + "body", + "files", + "password" + ] + } + } + } + ], + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "description": "Update an article.\n\nAccumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article." + }, + { + "method": "delete", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_eraseById", + "parameters": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + "body": { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + } + } + } + ], + "description": "Erase an article.\n\nPerforms soft deletion to the article." + } + ], + "errors": [], + "options": { + "keyword": true, + "separate": null + } +} \ No newline at end of file diff --git a/test/features/openai-keyword/src/Backend.ts b/test/features/openai-keyword/src/Backend.ts new file mode 100644 index 000000000..fc5f679b2 --- /dev/null +++ b/test/features/openai-keyword/src/Backend.ts @@ -0,0 +1,25 @@ +import core from "@nestia/core"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; +import { Singleton } from "tstl"; + +export class Backend { + public readonly application: Singleton> = + new Singleton(async () => + NestFactory.create( + await core.EncryptedModule.dynamic(__dirname + "/controllers", { + key: "A".repeat(32), + iv: "B".repeat(16), + }), + { logger: false }, + ), + ); + + public async open(): Promise { + return (await this.application.get()).listen(37_000); + } + + public async close(): Promise { + return (await this.application.get()).close(); + } +} diff --git a/test/features/openai-keyword/src/api/structures/IAttachmentFile.ts b/test/features/openai-keyword/src/api/structures/IAttachmentFile.ts new file mode 100644 index 000000000..1f6b693cf --- /dev/null +++ b/test/features/openai-keyword/src/api/structures/IAttachmentFile.ts @@ -0,0 +1,41 @@ +import { tags } from "typia"; + +/** + * Attachment File. + * + * Every attachment files that are managed in current system. + * + * @author Samchon + */ +export interface IAttachmentFile extends IAttachmentFile.ICreate { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of attachment file. + */ + created_at: string & tags.Format<"date-time">; +} + +export namespace IAttachmentFile { + export interface ICreate { + /** + * File name, except extension. + */ + name: string & tags.MaxLength<255>; + + /** + * Extension. + * + * Possible to omit like `README` case. + */ + extension: null | (string & tags.MinLength<1> & tags.MaxLength<8>); + + /** + * URL path of the real file. + */ + url: string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">; + } +} diff --git a/test/features/openai-keyword/src/api/structures/IBbsArticle.ts b/test/features/openai-keyword/src/api/structures/IBbsArticle.ts new file mode 100644 index 000000000..83f8d2718 --- /dev/null +++ b/test/features/openai-keyword/src/api/structures/IBbsArticle.ts @@ -0,0 +1,196 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; +import { IPage } from "./IPage"; + +/** + * Article entity. + * + * `IBbsArticle* is a super-type entity of all kinds of articles in the current + * backend system, literally shaping individual articles of the bulletin board. + * + * And, as you can see, the elements that must inevitably exist in the article, + * such as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist + * in the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship, + * which is because a new snapshot record is published every time the article is + * modified. + * + * The reason why a new snapshot record is published every time the article is + * modified is to preserve the evidence. Due to the nature of e-community, there + * is always a threat of dispute among the participants. And it can happen that + * disputes arise through articles or {@link IBbsArticleComment comments}, and to + * prevent such things as modifying existing articles to manipulate the situation, + * the article is designed in this structure. + * + * In other words, to keep evidence, and prevent fraud. + * + * @template Snapshot Snapshot content type of the article + * @author Samchon + */ +export interface IBbsArticle { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Writer of article. + */ + writer: string; + + /** + * List of snapshot contents. + * + * It is created for the first time when an article is created, and is + * accumulated every time the article is modified. + */ + snapshots: IBbsArticle.ISnapshot[] & tags.MinItems<1>; + + /** + * Creation time of article. + */ + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsArticle { + export type Format = "txt" | "md" | "html"; + + /** + * Snapshot of article. + * + * `IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of + * the article, as mentioned in {@link IBbsArticle}, the contents of the article + * are separated from the article record to keep evidence and prevent fraud. + */ + export interface ISnapshot extends Omit { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of snapshot record. + * + * In other words, creation time or update time or article. + */ + created_at: string & tags.Format<"date-time">; + } + + export interface IRequest extends IPage.IRequest { + /** + * Search condition. + */ + search?: IRequest.ISearch; + + /** + * Sort condition. + */ + sort?: IPage.Sort; + } + export namespace IRequest { + /** + * 검색 정보. + */ + export interface ISearch { + writer?: string; + title?: string; + body?: string; + title_or_body?: string; + + /** + * @format date-time + */ + from?: string; + + /** + * @format date-time + */ + to?: string; + } + + /** + * Sortable columns of {@link IBbsArticle}. + */ + export type SortableColumns = + | "writer" + | "title" + | "created_at" + | "updated_at"; + } + + /** + * Summarized information of the article. + */ + export interface ISummary { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Writer of the article. + */ + writer: string; + + /** + * Title of the last snapshot. + */ + title: string; + + /** + * Creation time of the article. + */ + created_at: string & tags.Format<"date-time">; + + /** + * Modification time of the article. + * + * In other words, the time when the last snapshot was created. + */ + updated_at: string & tags.Format<"date-time">; + } + + /** + * Abriged information of the article. + */ + export interface IAbridge extends ISummary, Omit {} + + /** + * Store content type of the article. + */ + export interface ICreate extends IUpdate { + writer: string; + } + + export interface IUpdate { + /** + * Format of body. + * + * Same meaning with extension like `html`, `md`, `txt`. + */ + format: Format; + + /** + * Title of article. + */ + title: string; + + /** + * Content body of article. + */ + body: string; + + /** + * List of attachment files. + */ + files: IAttachmentFile.ICreate[]; + + /** + * Password for modification. + */ + password: string; + } + + export interface IErase { + password: string; + } +} diff --git a/test/features/openai-keyword/src/api/structures/IPage.ts b/test/features/openai-keyword/src/api/structures/IPage.ts new file mode 100644 index 000000000..e02d83140 --- /dev/null +++ b/test/features/openai-keyword/src/api/structures/IPage.ts @@ -0,0 +1,77 @@ +import { tags } from "typia"; + +/** + * A page. + * + * Collection of records with pagination indformation. + * + * @template T Record type + * @author Samchon + */ +export interface IPage { + /** + * Page information. + */ + pagination: IPage.IPagination; + + /** + * List of records. + */ + data: T[]; +} +export namespace IPage { + /** + * Page information. + */ + export interface IPagination { + /** + * Current page number. + */ + current: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit: number & tags.Type<"uint32">; + + /** + * Total records in the database. + */ + records: number & tags.Type<"uint32">; + + /** + * Total pages. + * + * Equal to {@link records} / {@link limit} with ceiling. + */ + pages: number & tags.Type<"uint32">; + } + + /** + * Page request data + */ + export interface IRequest { + /** + * Page number. + */ + page?: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit?: number & tags.Type<"uint32">; + } + + /** + * Sorting column specialization. + * + * The plus means ascending order and the minus means descending order. + */ + export type Sort = Array< + `-${Literal}` | `+${Literal}` + >; +} diff --git a/test/features/openai-keyword/src/controllers/BbsArticleController.ts b/test/features/openai-keyword/src/controllers/BbsArticleController.ts new file mode 100644 index 000000000..80ca5ce48 --- /dev/null +++ b/test/features/openai-keyword/src/controllers/BbsArticleController.ts @@ -0,0 +1,122 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import { request } from "http"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller("bbs/articles") +export class BbsArticleController { + /** + * List up all summarized articles. + * + * List up all summarized articles with pagination and searching options. + * + * @param input Request info of pagination and searching options. + * @returns Paginated summarized articles. + * @author Samchon + */ + @core.TypedRoute.Patch() + public async index( + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + query; + return typia.random>(); + } + + /** + * List up all abridged articles. + * + * List up all abridged articles with pagination and searching options. + * + * @param input Request info of pagination and searching options. + * @returns Paginated abridged articles. + * @author Samchon + */ + @core.TypedRoute.Patch("abridges") + public async abridges( + @core.TypedBody() input: IBbsArticle.IRequest, + ): Promise> { + input; + return typia.random>(); + } + + /** + * Read individual article. + * + * Reads an article with its every {@link IBbsArticle.ISnapshot snapshots}. + * + * @param id Target article's {@link IBbsArticle.id} + * @returns Article information + * @author Samchon + */ + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + return { + ...typia.random(), + id, + }; + } + + /** + * Create a new article. + * + * Create a new article with its first {@link IBbsArticle.ISnapshot snapshot}. + * + * @param input Article information to create. + * @returns Newly created article. + * @author Samchon + */ + @core.TypedRoute.Post() + public async create( + @core.TypedBody() input: IBbsArticle.ICreate, + ): Promise { + request; + const output: IBbsArticle = { + ...typia.random(), + ...input, + }; + return output; + } + + /** + * Update an article. + * + * Accumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article. + * + * @param id Target article's {@link IBbsArticle.id} + * @param input Article information to update. + * @returns Newly accumulated snapshot information. + * @author Samchon + */ + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IUpdate, + ): Promise { + id; + input; + return typia.random(); + } + + /** + * Erase an article. + * + * Performs soft deletion to the article. + * + * @param id Target article's {@link IBbsArticle.id} + * @param input Password of the article. + * @author Samchon + */ + @core.TypedRoute.Delete(":id") + public async erase( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IErase, + ): Promise { + id; + input; + } +} diff --git a/test/features/openai-keyword/src/test/features/api/test_openai_document.ts b/test/features/openai-keyword/src/test/features/api/test_openai_document.ts new file mode 100644 index 000000000..c02e0222f --- /dev/null +++ b/test/features/openai-keyword/src/test/features/api/test_openai_document.ts @@ -0,0 +1,23 @@ +import { TestValidator } from "@nestia/e2e"; +import { IOpenAiDocument, IOpenAiSchema } from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import typia from "typia"; + +export const test_openai_document = async (): Promise => { + const document: IOpenAiDocument = JSON.parse( + await fs.promises.readFile(`${__dirname}/../../../../openai.json`, "utf8"), + ); + typia.assert(document); + + TestValidator.equals("options")(document.options)({ + keyword: true, + separate: null, + }); + TestValidator.equals("parameters")( + document.functions + .find( + (func) => func.path === "/bbs/articles/{id}" && func.method === "put", + ) + ?.parameters.map((p) => (p as IOpenAiSchema.IObject).type), + )(["object"]); +}; diff --git a/test/features/openai-keyword/src/test/index.ts b/test/features/openai-keyword/src/test/index.ts new file mode 100644 index 000000000..fd4b1c3c4 --- /dev/null +++ b/test/features/openai-keyword/src/test/index.ts @@ -0,0 +1,41 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + location: `${__dirname}/features`, + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + }); + await server.close(); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/openai-keyword/tsconfig.json b/test/features/openai-keyword/tsconfig.json new file mode 100644 index 000000000..afe2540b1 --- /dev/null +++ b/test/features/openai-keyword/tsconfig.json @@ -0,0 +1,99 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + }, + "include": ["src"], + } \ No newline at end of file diff --git a/test/features/openai/nestia.config.ts b/test/features/openai/nestia.config.ts new file mode 100644 index 000000000..653838a3e --- /dev/null +++ b/test/features/openai/nestia.config.ts @@ -0,0 +1,10 @@ +import { INestiaConfig } from "@nestia/sdk"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + openai: { + output: "./openai.json", + beautify: true, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/openai/openai.json b/test/features/openai/openai.json new file mode 100644 index 000000000..b9eed2729 --- /dev/null +++ b/test/features/openai/openai.json @@ -0,0 +1,848 @@ +{ + "openapi": "3.0.3", + "functions": [ + { + "method": "post", + "path": "/bbs/articles", + "name": "bbs_articles_post", + "parameters": [ + { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "writer", + "format", + "title", + "body", + "files", + "password" + ], + "description": "Store content type of the article." + } + ], + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of article", + "description": "Writer of article." + }, + "snapshots": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "minItems": 1, + "title": "List of snapshot contents", + "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of article", + "description": "Creation time of article." + } + }, + "required": [ + "id", + "writer", + "snapshots", + "created_at" + ], + "description": "Article entity.\n\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\nbackend system, literally shaping individual articles of the bulletin board.\n\nAnd, as you can see, the elements that must inevitably exist in the article,\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\nin the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship,\nwhich is because a new snapshot record is published every time the article is\nmodified.\n\nThe reason why a new snapshot record is published every time the article is\nmodified is to preserve the evidence. Due to the nature of e-community, there\nis always a threat of dispute among the participants. And it can happen that\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\nprevent such things as modifying existing articles to manipulate the situation,\nthe article is designed in this structure.\n\nIn other words, to keep evidence, and prevent fraud." + }, + "description": "Create a new article.\n\nCreate a new article with its first {@link IBbsArticle.ISnapshot snapshot}." + }, + { + "method": "patch", + "path": "/bbs/articles", + "name": "bbs_articles_patch", + "parameters": [ + { + "type": "object", + "properties": { + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + }, + "required": [] + } + ], + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "title": "Current page number", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + }, + "records": { + "type": "integer", + "title": "Total records in the database", + "description": "Total records in the database." + }, + "pages": { + "type": "integer", + "title": "Total pages", + "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." + } + }, + "required": [ + "current", + "limit", + "records", + "pages" + ], + "description": "Page information." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of the article", + "description": "Writer of the article." + }, + "title": { + "type": "string", + "title": "Title of the last snapshot", + "description": "Title of the last snapshot." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of the article", + "description": "Creation time of the article." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Modification time of the article", + "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." + } + }, + "required": [ + "id", + "writer", + "title", + "created_at", + "updated_at" + ], + "description": "Summarized information of the article." + }, + "title": "List of records", + "description": "List of records." + } + }, + "required": [ + "pagination", + "data" + ], + "description": "A page.\n\nCollection of records with pagination indformation." + }, + "description": "List up all summarized articles.\n\nList up all summarized articles with pagination and searching options." + }, + { + "method": "patch", + "path": "/bbs/articles/abridges", + "name": "bbs_articles_abridges_patch", + "parameters": [ + { + "type": "object", + "properties": { + "search": { + "type": "object", + "properties": { + "writer": { + "type": "string" + }, + "title": { + "type": "string" + }, + "body": { + "type": "string" + }, + "title_or_body": { + "type": "string" + }, + "from": { + "type": "string", + "format": "date-time" + }, + "to": { + "type": "string", + "format": "date-time" + } + }, + "description": "검색 정보." + }, + "sort": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "-title", + "-writer", + "-created_at", + "-updated_at", + "+title", + "+writer", + "+created_at", + "+updated_at" + ] + }, + "title": "Sort condition", + "description": "Sort condition." + }, + "page": { + "type": "integer", + "title": "Page number", + "description": "Page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + } + } + } + ], + "output": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "title": "Current page number", + "description": "Current page number." + }, + "limit": { + "type": "integer", + "title": "Limitation of records per a page", + "description": "Limitation of records per a page." + }, + "records": { + "type": "integer", + "title": "Total records in the database", + "description": "Total records in the database." + }, + "pages": { + "type": "integer", + "title": "Total pages", + "description": "Total pages.\n\nEqual to {@link records} / {@link limit} with ceiling." + } + }, + "required": [ + "current", + "limit", + "records", + "pages" + ], + "description": "Page information." + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of the article", + "description": "Writer of the article." + }, + "title": { + "type": "string", + "title": "Title of the last snapshot", + "description": "Title of the last snapshot." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of the article", + "description": "Creation time of the article." + }, + "updated_at": { + "type": "string", + "format": "date-time", + "title": "Modification time of the article", + "description": "Modification time of the article.\n\nIn other words, the time when the last snapshot was created." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "writer", + "title", + "created_at", + "updated_at", + "format", + "body", + "files" + ], + "description": "Abriged information of the article." + }, + "title": "List of records", + "description": "List of records." + } + }, + "required": [ + "pagination", + "data" + ], + "description": "A page.\n\nCollection of records with pagination indformation." + }, + "description": "List up all abridged articles.\n\nList up all abridged articles with pagination and searching options." + }, + { + "method": "get", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_getById", + "parameters": [ + { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + } + ], + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "writer": { + "type": "string", + "title": "Writer of article", + "description": "Writer of article." + }, + "snapshots": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "minItems": 1, + "title": "List of snapshot contents", + "description": "List of snapshot contents.\n\nIt is created for the first time when an article is created, and is\naccumulated every time the article is modified." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of article", + "description": "Creation time of article." + } + }, + "required": [ + "id", + "writer", + "snapshots", + "created_at" + ], + "description": "Article entity.\n\n`IBbsArticle* is a super-type entity of all kinds of articles in the current\nbackend system, literally shaping individual articles of the bulletin board.\n\nAnd, as you can see, the elements that must inevitably exist in the article,\nsuch as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist\nin the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship,\nwhich is because a new snapshot record is published every time the article is\nmodified.\n\nThe reason why a new snapshot record is published every time the article is\nmodified is to preserve the evidence. Due to the nature of e-community, there\nis always a threat of dispute among the participants. And it can happen that\ndisputes arise through articles or {@link IBbsArticleComment comments}, and to\nprevent such things as modifying existing articles to manipulate the situation,\nthe article is designed in this structure.\n\nIn other words, to keep evidence, and prevent fraud." + }, + "description": "Read individual article.\n\nReads an article with its every {@link IBbsArticle.ISnapshot snapshots}." + }, + { + "method": "put", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_putById", + "parameters": [ + { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + { + "type": "object", + "properties": { + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ], + "title": "Format of body", + "description": "Format of body.\n\nSame meaning with extension like `html`, `md`, `txt`." + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + }, + "password": { + "type": "string", + "title": "Password for modification", + "description": "Password for modification." + } + }, + "required": [ + "format", + "title", + "body", + "files", + "password" + ] + } + ], + "output": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "title": "Primary Key", + "description": "Primary Key." + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Creation time of snapshot record", + "description": "Creation time of snapshot record.\n\nIn other words, creation time or update time or article." + }, + "format": { + "type": "string", + "enum": [ + "txt", + "md", + "html" + ] + }, + "title": { + "type": "string", + "title": "Title of article", + "description": "Title of article." + }, + "body": { + "type": "string", + "title": "Content body of article", + "description": "Content body of article." + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255, + "title": "File name, except extension", + "description": "File name, except extension." + }, + "extension": { + "type": "string", + "minLength": 1, + "maxLength": 8, + "nullable": true, + "title": "Extension", + "description": "Extension.\n\nPossible to omit like `README` case." + }, + "url": { + "type": "string", + "format": "uri", + "contentMediaType": "image/*", + "title": "URL path of the real file", + "description": "URL path of the real file." + } + }, + "required": [ + "name", + "extension", + "url" + ] + }, + "title": "List of attachment files", + "description": "List of attachment files." + } + }, + "required": [ + "id", + "created_at", + "format", + "title", + "body", + "files" + ], + "description": "Snapshot of article.\n\n`IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of\nthe article, as mentioned in {@link IBbsArticle}, the contents of the article\nare separated from the article record to keep evidence and prevent fraud." + }, + "description": "Update an article.\n\nAccumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article." + }, + { + "method": "delete", + "path": "/bbs/articles/{id}", + "name": "bbs_articles_eraseById", + "parameters": [ + { + "type": "string", + "format": "uuid", + "description": " Target article's {@link IBbsArticle.id}" + }, + { + "type": "object", + "properties": { + "password": { + "type": "string" + } + }, + "required": [ + "password" + ] + } + ], + "description": "Erase an article.\n\nPerforms soft deletion to the article." + } + ], + "errors": [], + "options": { + "keyword": false, + "separate": null + } +} \ No newline at end of file diff --git a/test/features/openai/src/Backend.ts b/test/features/openai/src/Backend.ts new file mode 100644 index 000000000..fc5f679b2 --- /dev/null +++ b/test/features/openai/src/Backend.ts @@ -0,0 +1,25 @@ +import core from "@nestia/core"; +import { INestApplication } from "@nestjs/common"; +import { NestFactory } from "@nestjs/core"; +import { Singleton } from "tstl"; + +export class Backend { + public readonly application: Singleton> = + new Singleton(async () => + NestFactory.create( + await core.EncryptedModule.dynamic(__dirname + "/controllers", { + key: "A".repeat(32), + iv: "B".repeat(16), + }), + { logger: false }, + ), + ); + + public async open(): Promise { + return (await this.application.get()).listen(37_000); + } + + public async close(): Promise { + return (await this.application.get()).close(); + } +} diff --git a/test/features/openai/src/api/structures/IAttachmentFile.ts b/test/features/openai/src/api/structures/IAttachmentFile.ts new file mode 100644 index 000000000..1f6b693cf --- /dev/null +++ b/test/features/openai/src/api/structures/IAttachmentFile.ts @@ -0,0 +1,41 @@ +import { tags } from "typia"; + +/** + * Attachment File. + * + * Every attachment files that are managed in current system. + * + * @author Samchon + */ +export interface IAttachmentFile extends IAttachmentFile.ICreate { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of attachment file. + */ + created_at: string & tags.Format<"date-time">; +} + +export namespace IAttachmentFile { + export interface ICreate { + /** + * File name, except extension. + */ + name: string & tags.MaxLength<255>; + + /** + * Extension. + * + * Possible to omit like `README` case. + */ + extension: null | (string & tags.MinLength<1> & tags.MaxLength<8>); + + /** + * URL path of the real file. + */ + url: string & tags.Format<"uri"> & tags.ContentMediaType<"image/*">; + } +} diff --git a/test/features/openai/src/api/structures/IBbsArticle.ts b/test/features/openai/src/api/structures/IBbsArticle.ts new file mode 100644 index 000000000..83f8d2718 --- /dev/null +++ b/test/features/openai/src/api/structures/IBbsArticle.ts @@ -0,0 +1,196 @@ +import { tags } from "typia"; + +import { IAttachmentFile } from "./IAttachmentFile"; +import { IPage } from "./IPage"; + +/** + * Article entity. + * + * `IBbsArticle* is a super-type entity of all kinds of articles in the current + * backend system, literally shaping individual articles of the bulletin board. + * + * And, as you can see, the elements that must inevitably exist in the article, + * such as the `title` or the `body`, do not exist in the `IBbsArticle`, but exist + * in the subsidiary entity, {@link IBbsArticle.ISnapshot}, as a 1: N relationship, + * which is because a new snapshot record is published every time the article is + * modified. + * + * The reason why a new snapshot record is published every time the article is + * modified is to preserve the evidence. Due to the nature of e-community, there + * is always a threat of dispute among the participants. And it can happen that + * disputes arise through articles or {@link IBbsArticleComment comments}, and to + * prevent such things as modifying existing articles to manipulate the situation, + * the article is designed in this structure. + * + * In other words, to keep evidence, and prevent fraud. + * + * @template Snapshot Snapshot content type of the article + * @author Samchon + */ +export interface IBbsArticle { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Writer of article. + */ + writer: string; + + /** + * List of snapshot contents. + * + * It is created for the first time when an article is created, and is + * accumulated every time the article is modified. + */ + snapshots: IBbsArticle.ISnapshot[] & tags.MinItems<1>; + + /** + * Creation time of article. + */ + created_at: string & tags.Format<"date-time">; +} +export namespace IBbsArticle { + export type Format = "txt" | "md" | "html"; + + /** + * Snapshot of article. + * + * `IBbsArticle.ISnapshot` is a snapshot entity that contains the contents of + * the article, as mentioned in {@link IBbsArticle}, the contents of the article + * are separated from the article record to keep evidence and prevent fraud. + */ + export interface ISnapshot extends Omit { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Creation time of snapshot record. + * + * In other words, creation time or update time or article. + */ + created_at: string & tags.Format<"date-time">; + } + + export interface IRequest extends IPage.IRequest { + /** + * Search condition. + */ + search?: IRequest.ISearch; + + /** + * Sort condition. + */ + sort?: IPage.Sort; + } + export namespace IRequest { + /** + * 검색 정보. + */ + export interface ISearch { + writer?: string; + title?: string; + body?: string; + title_or_body?: string; + + /** + * @format date-time + */ + from?: string; + + /** + * @format date-time + */ + to?: string; + } + + /** + * Sortable columns of {@link IBbsArticle}. + */ + export type SortableColumns = + | "writer" + | "title" + | "created_at" + | "updated_at"; + } + + /** + * Summarized information of the article. + */ + export interface ISummary { + /** + * Primary Key. + */ + id: string & tags.Format<"uuid">; + + /** + * Writer of the article. + */ + writer: string; + + /** + * Title of the last snapshot. + */ + title: string; + + /** + * Creation time of the article. + */ + created_at: string & tags.Format<"date-time">; + + /** + * Modification time of the article. + * + * In other words, the time when the last snapshot was created. + */ + updated_at: string & tags.Format<"date-time">; + } + + /** + * Abriged information of the article. + */ + export interface IAbridge extends ISummary, Omit {} + + /** + * Store content type of the article. + */ + export interface ICreate extends IUpdate { + writer: string; + } + + export interface IUpdate { + /** + * Format of body. + * + * Same meaning with extension like `html`, `md`, `txt`. + */ + format: Format; + + /** + * Title of article. + */ + title: string; + + /** + * Content body of article. + */ + body: string; + + /** + * List of attachment files. + */ + files: IAttachmentFile.ICreate[]; + + /** + * Password for modification. + */ + password: string; + } + + export interface IErase { + password: string; + } +} diff --git a/test/features/openai/src/api/structures/IPage.ts b/test/features/openai/src/api/structures/IPage.ts new file mode 100644 index 000000000..e02d83140 --- /dev/null +++ b/test/features/openai/src/api/structures/IPage.ts @@ -0,0 +1,77 @@ +import { tags } from "typia"; + +/** + * A page. + * + * Collection of records with pagination indformation. + * + * @template T Record type + * @author Samchon + */ +export interface IPage { + /** + * Page information. + */ + pagination: IPage.IPagination; + + /** + * List of records. + */ + data: T[]; +} +export namespace IPage { + /** + * Page information. + */ + export interface IPagination { + /** + * Current page number. + */ + current: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit: number & tags.Type<"uint32">; + + /** + * Total records in the database. + */ + records: number & tags.Type<"uint32">; + + /** + * Total pages. + * + * Equal to {@link records} / {@link limit} with ceiling. + */ + pages: number & tags.Type<"uint32">; + } + + /** + * Page request data + */ + export interface IRequest { + /** + * Page number. + */ + page?: number & tags.Type<"uint32">; + + /** + * Limitation of records per a page. + * + * @default 100 + */ + limit?: number & tags.Type<"uint32">; + } + + /** + * Sorting column specialization. + * + * The plus means ascending order and the minus means descending order. + */ + export type Sort = Array< + `-${Literal}` | `+${Literal}` + >; +} diff --git a/test/features/openai/src/controllers/BbsArticleController.ts b/test/features/openai/src/controllers/BbsArticleController.ts new file mode 100644 index 000000000..80ca5ce48 --- /dev/null +++ b/test/features/openai/src/controllers/BbsArticleController.ts @@ -0,0 +1,122 @@ +import core from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import { request } from "http"; +import typia, { tags } from "typia"; + +import { IBbsArticle } from "@api/lib/structures/IBbsArticle"; +import { IPage } from "@api/lib/structures/IPage"; + +@Controller("bbs/articles") +export class BbsArticleController { + /** + * List up all summarized articles. + * + * List up all summarized articles with pagination and searching options. + * + * @param input Request info of pagination and searching options. + * @returns Paginated summarized articles. + * @author Samchon + */ + @core.TypedRoute.Patch() + public async index( + @core.TypedQuery() query: IPage.IRequest, + ): Promise> { + query; + return typia.random>(); + } + + /** + * List up all abridged articles. + * + * List up all abridged articles with pagination and searching options. + * + * @param input Request info of pagination and searching options. + * @returns Paginated abridged articles. + * @author Samchon + */ + @core.TypedRoute.Patch("abridges") + public async abridges( + @core.TypedBody() input: IBbsArticle.IRequest, + ): Promise> { + input; + return typia.random>(); + } + + /** + * Read individual article. + * + * Reads an article with its every {@link IBbsArticle.ISnapshot snapshots}. + * + * @param id Target article's {@link IBbsArticle.id} + * @returns Article information + * @author Samchon + */ + @core.TypedRoute.Get(":id") + public async at( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + ): Promise { + return { + ...typia.random(), + id, + }; + } + + /** + * Create a new article. + * + * Create a new article with its first {@link IBbsArticle.ISnapshot snapshot}. + * + * @param input Article information to create. + * @returns Newly created article. + * @author Samchon + */ + @core.TypedRoute.Post() + public async create( + @core.TypedBody() input: IBbsArticle.ICreate, + ): Promise { + request; + const output: IBbsArticle = { + ...typia.random(), + ...input, + }; + return output; + } + + /** + * Update an article. + * + * Accumulate a new {@link IBbsArticle.ISnapshot snapshot} record to the article. + * + * @param id Target article's {@link IBbsArticle.id} + * @param input Article information to update. + * @returns Newly accumulated snapshot information. + * @author Samchon + */ + @core.TypedRoute.Put(":id") + public async update( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IUpdate, + ): Promise { + id; + input; + return typia.random(); + } + + /** + * Erase an article. + * + * Performs soft deletion to the article. + * + * @param id Target article's {@link IBbsArticle.id} + * @param input Password of the article. + * @author Samchon + */ + @core.TypedRoute.Delete(":id") + public async erase( + @core.TypedParam("id") id: string & tags.Format<"uuid">, + @core.TypedBody() input: IBbsArticle.IErase, + ): Promise { + id; + input; + } +} diff --git a/test/features/openai/src/test/features/api/test_openai_document.ts b/test/features/openai/src/test/features/api/test_openai_document.ts new file mode 100644 index 000000000..9b05bd7c4 --- /dev/null +++ b/test/features/openai/src/test/features/api/test_openai_document.ts @@ -0,0 +1,25 @@ +import { TestValidator } from "@nestia/e2e"; +import { IOpenAiDocument, IOpenAiSchema } from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import typia from "typia"; + +export const test_openai_document = async (): Promise => { + const document: IOpenAiDocument = JSON.parse( + await fs.promises.readFile(`${__dirname}/../../../../openai.json`, "utf8"), + ); + typia.assert(document); + + TestValidator.equals("options")(document.options)({ + keyword: false, + separate: null, + }); + TestValidator.equals("parameters")( + document.functions + .find( + (func) => func.path === "/bbs/articles/{id}" && func.method === "put", + ) + ?.parameters.map( + (p) => (p as IOpenAiSchema.IString | IOpenAiSchema.IObject).type, + ), + )(["string", "object"]); +}; diff --git a/test/features/openai/src/test/index.ts b/test/features/openai/src/test/index.ts new file mode 100644 index 000000000..fd4b1c3c4 --- /dev/null +++ b/test/features/openai/src/test/index.ts @@ -0,0 +1,41 @@ +import { DynamicExecutor } from "@nestia/e2e"; + +import { Backend } from "../Backend"; + +async function main(): Promise { + const server: Backend = new Backend(); + await server.open(); + + const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ + extension: __filename.substring(__filename.length - 2), + location: `${__dirname}/features`, + prefix: "test", + parameters: () => [ + { + host: "http://127.0.0.1:37000", + encryption: { + key: "A".repeat(32), + iv: "B".repeat(16), + }, + }, + ], + }); + await server.close(); + + const exceptions: Error[] = report.executions + .filter((exec) => exec.error !== null) + .map((exec) => exec.error!); + if (exceptions.length === 0) { + console.log("Success"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + } else { + for (const exp of exceptions) console.log(exp); + console.log("Failed"); + console.log("Elapsed time", report.time.toLocaleString(), `ms`); + process.exit(-1); + } +} +main().catch((exp) => { + console.log(exp); + process.exit(-1); +}); diff --git a/test/features/openai/tsconfig.json b/test/features/openai/tsconfig.json new file mode 100644 index 000000000..afe2540b1 --- /dev/null +++ b/test/features/openai/tsconfig.json @@ -0,0 +1,99 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ + "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */// "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + "paths": { + "@api": ["./src/api"], + "@api/lib/*": ["./src/api/*"], + }, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. *//* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + "plugins": [ + { "transform": "typescript-transform-paths" }, + { "transform": "typia/lib/transform" }, + { "transform": "@nestia/core/lib/transform" }, + ], + }, + "include": ["src"], + } \ No newline at end of file diff --git a/test/features/openapi_v2/swagger.json b/test/features/openapi_v2/swagger.json index 5ec351f5d..300f02805 100644 --- a/test/features/openapi_v2/swagger.json +++ b/test/features/openapi_v2/swagger.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"version":"3.6.1","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"host":"github.com/samchon/nestia","definitions":{"schemas":{},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/definitions/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/definitions/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/definitions/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"type":"integer","x-nullable":true},"limit":{"type":"integer","x-nullable":true}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/definitions/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"x-nullable":true},"extension":{"type":"string","minLength":1,"maxLength":8,"x-nullable":true},"url":{"type":"string","format":"uri","x-nullable":true}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/IBbsComment"}},"pagination":{"$ref":"#/definitions/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["body","files"]}},"securityDefinitions":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","schema":{}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPerformance"}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"integer","x-nullable":true,"name":"page","in":"query"},{"type":"integer","x-nullable":true,"name":"limit","in":"query"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPageIBbsArticle.ISummary"}}}},"post":{"tags":[],"parameters":[{"type":"string","description":" Section code","name":"section","in":"path"},{"name":"body","in":"body","description":"Content to store","required":true,"schema":{"$ref":"#/definitions/IBbsArticle.IStore"}}],"responses":{"201":{"description":"Newly archived article","schema":{"$ref":"#/definitions/IBbsArticle"}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsArticle"}}}},"put":{"tags":[],"parameters":[{"type":"string","description":" Section code","name":"section","in":"path"},{"type":"string","format":"uuid","description":" Target article ID","name":"id","in":"path"},{"name":"body","in":"body","description":"Content to update","required":true,"schema":{"$ref":"#/definitions/IBbsArticle.IStore"}}],"responses":{"200":{"description":"Updated content","schema":{"$ref":"#/definitions/IBbsArticle"}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"integer","x-nullable":true,"name":"page","in":"query"},{"type":"integer","x-nullable":true,"name":"limit","in":"query"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPageIBbsComment"}}}},"post":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/IBbsComment.IStore"}}],"responses":{"201":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}},"put":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/IBbsComment.IStore"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}}}},"tags":[]} \ No newline at end of file +{"swagger":"2.0","info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"host":"github.com/samchon/nestia","definitions":{"schemas":{},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/definitions/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/definitions/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/definitions/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"type":"integer","x-nullable":true},"limit":{"type":"integer","x-nullable":true}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/definitions/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"x-nullable":true},"extension":{"type":"string","minLength":1,"maxLength":8,"x-nullable":true},"url":{"type":"string","format":"uri","x-nullable":true}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/definitions/IBbsComment"}},"pagination":{"$ref":"#/definitions/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/definitions/IAttachmentFile"}}},"required":["body","files"]}},"securityDefinitions":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","schema":{}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPerformance"}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"integer","x-nullable":true,"name":"page","in":"query"},{"type":"integer","x-nullable":true,"name":"limit","in":"query"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPageIBbsArticle.ISummary"}}}},"post":{"tags":[],"parameters":[{"type":"string","description":" Section code","name":"section","in":"path"},{"name":"body","in":"body","description":"Content to store","required":true,"schema":{"$ref":"#/definitions/IBbsArticle.IStore"}}],"responses":{"201":{"description":"Newly archived article","schema":{"$ref":"#/definitions/IBbsArticle"}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsArticle"}}}},"put":{"tags":[],"parameters":[{"type":"string","description":" Section code","name":"section","in":"path"},{"type":"string","format":"uuid","description":" Target article ID","name":"id","in":"path"},{"name":"body","in":"body","description":"Content to update","required":true,"schema":{"$ref":"#/definitions/IBbsArticle.IStore"}}],"responses":{"200":{"description":"Updated content","schema":{"$ref":"#/definitions/IBbsArticle"}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"integer","x-nullable":true,"name":"page","in":"query"},{"type":"integer","x-nullable":true,"name":"limit","in":"query"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IPageIBbsComment"}}}},"post":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/IBbsComment.IStore"}}],"responses":{"201":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}},"put":{"tags":[],"parameters":[{"type":"string","name":"section","in":"path"},{"type":"string","format":"uuid","name":"articleId","in":"path"},{"type":"string","format":"uuid","name":"id","in":"path"},{"name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/IBbsComment.IStore"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/IBbsComment"}}}}}},"tags":[]} \ No newline at end of file diff --git a/test/features/openapi_v3/swagger.json b/test/features/openapi_v3/swagger.json index b89d5d9ec..abf823c98 100644 --- a/test/features/openapi_v3/swagger.json +++ b/test/features/openapi_v3/swagger.json @@ -1 +1 @@ -{"openapi":"3.0.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.1","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"components":{"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"limit":{"type":"integer","nullable":true}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"nullable":true},"extension":{"type":"string","minLength":1,"maxLength":8,"nullable":true},"url":{"type":"string","format":"uri","nullable":true}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"type":"integer","nullable":true},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","nullable":true},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"type":"integer","nullable":true},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","nullable":true},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"tags":[]} \ No newline at end of file +{"openapi":"3.0.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"components":{"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IPage.IRequest":{"type":"object","properties":{"page":{"type":"integer","nullable":true},"limit":{"type":"integer","nullable":true}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"nullable":true},"extension":{"type":"string","minLength":1,"maxLength":8,"nullable":true},"url":{"type":"string","format":"uri","nullable":true}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPageIBbsComment":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsComment"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsComment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","created_at","body","files"]},"IBbsComment.IStore":{"type":"object","properties":{"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["body","files"]}}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/bbs/{section}/articles":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"page","in":"query","schema":{"type":"integer","nullable":true},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","nullable":true},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/{section}/articles/{articleId}/comments":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"page","in":"query","schema":{"type":"integer","nullable":true},"required":false},{"name":"limit","in":"query","schema":{"type":"integer","nullable":true},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsComment"}}}}}},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}},"/{section}/articles/{articleId}/comments/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true},{"name":"articleId","in":"path","schema":{"type":"string","format":"uuid"},"required":true},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment.IStore"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsComment"}}}}}}}},"tags":[]} \ No newline at end of file diff --git a/test/features/operationId/src/api/functional/operationId/index.ts b/test/features/operationId/src/api/functional/operationId/index.ts index 1a4f49719..ba551b46d 100644 --- a/test/features/operationId/src/api/functional/operationId/index.ts +++ b/test/features/operationId/src/api/functional/operationId/index.ts @@ -8,9 +8,7 @@ import type { IConnection } from "@nestia/fetcher"; import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; /** - * * @operationId some-custom-operation-id - * * @controller OperationIdController.custom * @path GET /operationId/custom * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/operationId/swagger.json b/test/features/operationId/swagger.json index 9c2328012..818e69960 100644 --- a/test/features/operationId/swagger.json +++ b/test/features/operationId/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"operationId":"HealthController.get","parameters":[],"responses":{"200":{"description":""}}}},"/operationId/custom":{"get":{"tags":[],"operationId":"some-custom-operation-id","parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"operationId":"PerformanceController.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"operationId":"HealthController.get","parameters":[],"responses":{"200":{"description":""}}}},"/operationId/custom":{"get":{"tags":[],"operationId":"some-custom-operation-id","parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"operationId":"PerformanceController.get","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/param/swagger.json b/test/features/param/swagger.json index c744fbc33..739294d18 100644 --- a/test/features/param/swagger.json +++ b/test/features/param/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.5.1-dev.20240710", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { @@ -54,6 +54,7 @@ "schema": { "type": "string" }, + "required": true, "title": "The first value", "description": " The first value.\r\nThe first string value." }, @@ -63,6 +64,7 @@ "schema": { "type": "string" }, + "required": true, "title": "The second value", "description": " The second value.\r\nThe second string value." } @@ -93,6 +95,7 @@ "schema": { "type": "boolean" }, + "required": true, "title": "The boolean value", "description": " The boolean value.\r\nThe boolean value as a path parameter." } @@ -123,6 +126,7 @@ "schema": { "type": "number" }, + "required": true, "title": "Description in the parameter", "description": "Description in the parameter." } @@ -153,6 +157,7 @@ "schema": { "type": "string" }, + "required": true, "title": "Yaho", "description": "Yoohoo" } @@ -189,7 +194,8 @@ "type": "string" } ] - } + }, + "required": true } ], "responses": { @@ -232,7 +238,8 @@ "const": "C" } ] - } + }, + "required": true } ], "responses": { @@ -269,7 +276,8 @@ "schema": { "type": "string", "format": "uuid" - } + }, + "required": true } ], "responses": { @@ -296,7 +304,8 @@ "schema": { "type": "string", "format": "date" - } + }, + "required": true } ], "responses": { @@ -330,7 +339,8 @@ "format": "uuid" } ] - } + }, + "required": true } ], "responses": { @@ -371,7 +381,8 @@ "format": "date" } ] - } + }, + "required": true } ], "responses": { diff --git a/test/features/plain/swagger.json b/test/features/plain/swagger.json index cf42f37ab..f6e589e9d 100644 --- a/test/features/plain/swagger.json +++ b/test/features/plain/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain/string":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/template":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string","pattern":"^((something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_false_it\\?)|(something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_true_it\\?))$"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/constant":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/plain/string":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/template":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string","pattern":"^((something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_false_it\\?)|(something_[+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?_interesting_(.*)_is_not_true_it\\?))$"}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/plain/constant":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"oneOf":[{"const":"A"},{"const":"B"},{"const":"C"}]}}},"required":true},"responses":{"201":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/propagate/src/api/functional/members/index.ts b/test/features/propagate/src/api/functional/members/index.ts index 6d6ff99b2..a32a12017 100644 --- a/test/features/propagate/src/api/functional/members/index.ts +++ b/test/features/propagate/src/api/functional/members/index.ts @@ -15,7 +15,6 @@ import type { INotFound } from "../../structures/INotFound"; * @throws 403 * @throws 404 * @throws 422 - * * @controller MembersController.login * @path POST /members/login * @nestia Generated by Nestia - https://github.com/samchon/nestia diff --git a/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts b/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts index a095cf0a2..b81b0e4a9 100644 --- a/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts +++ b/test/features/propagate/src/test/features/api/automated/test_api_members_login.ts @@ -7,15 +7,12 @@ import type { IMember } from "../../../../api/structures/IMember"; import type { INotFound } from "../../../../api/structures/INotFound"; export const test_api_members_login = async (connection: api.IConnection) => { - const output: IPropagation< - { - 201: IMember; - 403: IForbidden; - 404: INotFound; - 422: IForbidden.IExpired; - }, - 201 - > = await api.functional.members.login( + const output: IPropagation<{ + 201: IMember; + 403: IForbidden; + 404: INotFound; + 422: IForbidden.IExpired; + }> = await api.functional.members.login( connection, typia.random(), ); diff --git a/test/features/propagate/swagger.json b/test/features/propagate/swagger.json index 20fdc9f4b..842102f63 100644 --- a/test/features/propagate/swagger.json +++ b/test/features/propagate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.5.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/members/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember"}}},"x-nestia-encrypted":true},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/INotFound"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden.IExpired"}}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IMember.ILogin":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},"IForbidden":{"type":"object","properties":{"status":{"const":403},"message":{"type":"string"}},"required":["status","message"]},"INotFound":{"type":"object","properties":{"status":{"const":404},"message":{"type":"string"}},"required":["status","message"]},"IForbidden.IExpired":{"type":"object","properties":{"status":{"const":422},"message":{"type":"string"}},"required":["status","message"]},"IMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"nickname":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","nickname","created_at"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/members/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/IMember"}}},"x-nestia-encrypted":true},"403":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden"}}}},"404":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/INotFound"}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IForbidden.IExpired"}}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IMember.ILogin":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},"IForbidden":{"type":"object","properties":{"status":{"const":403},"message":{"type":"string"}},"required":["status","message"]},"INotFound":{"type":"object","properties":{"status":{"const":404},"message":{"type":"string"}},"required":["status","message"]},"IForbidden.IExpired":{"type":"object","properties":{"status":{"const":422},"message":{"type":"string"}},"required":["status","message"]},"IMember":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"nickname":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["id","email","nickname","created_at"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query-decompose-false/swagger.json b/test/features/query-decompose-false/swagger.json index 0c76caaef..c67e27d5b 100644 --- a/test/features/query-decompose-false/swagger.json +++ b/test/features/query-decompose-false/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.6.0", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { diff --git a/test/features/query-decompose-true/swagger.json b/test/features/query-decompose-true/swagger.json index 6147f17d4..159b01437 100644 --- a/test/features/query-decompose-true/swagger.json +++ b/test/features/query-decompose-true/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","values","atomic"]},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","values"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/query/swagger.json b/test/features/query/swagger.json index e38f54e85..a52d26e82 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"a","in":"query","schema":{"type":"string"},"required":false},{"name":"b","in":"query","schema":{"type":"number"},"required":false},{"name":"c","in":"query","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/query/typed":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false},{"name":"atomic","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/optional":{"get":{"tags":[],"parameters":[{"name":"a","in":"query","schema":{"type":"string"},"required":false},{"name":"b","in":"query","schema":{"type":"number"},"required":false},{"name":"c","in":"query","schema":{"type":"boolean"},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IOptionalQuery"}}}}}}},"/query/nest":{"get":{"tags":[],"parameters":[{"name":"limit","in":"query","schema":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"required":false},{"name":"enforce","in":"query","schema":{"oneOf":[{"const":"false"},{"const":"true"}]},"required":true},{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/individual":{"get":{"tags":[],"parameters":[{"name":"id","in":"query","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/query/composite":{"get":{"tags":[],"parameters":[{"name":"atomic","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"required":true},{"name":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}},"/query/body":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}},"required":true},"responses":{"201":{"description":"","content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/IQuery"}}}}}}}},"components":{"schemas":{"IQuery":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}},"atomic":{"oneOf":[{"type":"null"},{"type":"string"}]}},"required":["enforce","atomic"]},"IOptionalQuery":{"type":"object","properties":{"a":{"type":"string"},"b":{"type":"number"},"c":{"type":"boolean"}}},"INestQuery":{"type":"object","properties":{"limit":{"type":"string","pattern":"^([+-]?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)$"},"enforce":{"oneOf":[{"const":"false"},{"const":"true"}]},"atomic":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce","atomic","values"]},"OmitIQueryatomic":{"type":"object","properties":{"limit":{"type":"number"},"enforce":{"type":"boolean"},"values":{"type":"array","items":{"type":"string"}}},"required":["enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-assert/swagger.json b/test/features/route-manual-assert/swagger.json index 36d60841c..a859fe346 100644 --- a/test/features/route-manual-assert/swagger.json +++ b/test/features/route-manual-assert/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-is/swagger.json b/test/features/route-manual-is/swagger.json index 36d60841c..a859fe346 100644 --- a/test/features/route-manual-is/swagger.json +++ b/test/features/route-manual-is/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-stringify/swagger.json b/test/features/route-manual-stringify/swagger.json index 36d60841c..a859fe346 100644 --- a/test/features/route-manual-stringify/swagger.json +++ b/test/features/route-manual-stringify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-validate/swagger.json b/test/features/route-manual-validate/swagger.json index 36d60841c..a859fe346 100644 --- a/test/features/route-manual-validate/swagger.json +++ b/test/features/route-manual-validate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route/swagger.json b/test/features/route/swagger.json index 36d60841c..a859fe346 100644 --- a/test/features/route/swagger.json +++ b/test/features/route/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/route/random":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/security/swagger.json b/test/features/security/swagger.json index d8d9815e9..d22e87832 100644 --- a/test/features/security/swagger.json +++ b/test/features/security/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/basic":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/basic_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/bearer":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/bearer_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/oauth2":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/oauth2_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/optional_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{},{"bearer":[]}]}},"/security":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}}}}},"components":{"schemas":{"IToken":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"securitySchemes":{"basic":{"type":"http","scheme":"basic"},"bearer":{"type":"http","scheme":"bearer"},"oauth2":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"security":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"x1":"x1","x2":"x2"}}}}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/basic":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/basic_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"basic":[]}]}},"/bearer":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/bearer_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"bearer":[]}]}},"/oauth2":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/oauth2_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{"oauth2":["write:pets","read:pets"]}]}},"/optional_by_comment":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}},"security":[{},{"bearer":[]}]}},"/security":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IToken"}}}}}}}},"components":{"schemas":{"IToken":{"type":"object","properties":{"value":{"type":"string"}},"required":["value"]}},"securitySchemes":{"basic":{"type":"http","scheme":"basic"},"bearer":{"type":"http","scheme":"bearer"},"oauth2":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"security":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://example.com/api/oauth/dialog","refreshUrl":"https://example.com/api/oauth/refresh","scopes":{"x1":"x1","x2":"x2"}}}}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/simulate/swagger.json b/test/features/simulate/swagger.json index aac95e69b..432293fb9 100644 --- a/test/features/simulate/swagger.json +++ b/test/features/simulate/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/first/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"required":true,"description":" Target data"}],"responses":{"200":{"description":"The first article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get first article of a day","description":"Get first article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."}},"/bbs/{section}/articles/first/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"required":true,"description":" Target data"}],"responses":{"200":{"description":"The first article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get first article of a day","description":"Get first article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of yours","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IJoin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of newly joined seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Join as a seller","description":"Join as a seller."}},"/sellers/authenticate/login":{"post":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nEmail and password","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.ILogin"}}},"required":true,"x-nestia-encrypted":true},"responses":{"201":{"description":"## Warning\n\nResponse data have been encrypted.\n\nThe response body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedRoute.P.ost](https://github.com/samchon/@nestia/core#encryptedroute) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nInformation of the seller","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IAuthorized"}}},"x-nestia-encrypted":true}},"summary":"Log-in as a seller","description":"Log-in as a seller."}},"/sellers/authenticate/password/change":{"patch":{"tags":[],"parameters":[],"requestBody":{"description":"## Warning\n\nRequest body must be encrypted.\n\nThe request body data would be encrypted as \"AES-128(256) / CBC mode / PKCS#5 Padding / Base64 Encoding\", through the [EncryptedBody](https://github.com/samchon/@nestia/core#encryptedbody) component.\n\nTherefore, just utilize this swagger editor only for referencing. If you need to call the real API, using [SDK](https://github.com/samchon/nestia#software-development-kit) would be much better.\n\n----------------\n\nOld and new passwords","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ISeller.IChangePassword"}}},"required":true,"x-nestia-encrypted":true},"responses":{"200":{"description":"Empty object"}},"summary":"Change password","description":"Change password."}},"/sellers/authenticate/exit":{"delete":{"tags":[],"parameters":[],"responses":{"200":{"description":""}},"summary":"Erase the seller by itself","description":"Erase the seller by itself."}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"ISeller.IJoin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"name":{"type":"string"},"mobile":{"type":"string"},"company":{"type":"string"}},"required":["email","password","name","mobile","company"]},"ISeller.IAuthorized":{"type":"object","properties":{"authorization":{"type":"object","properties":{"token":{"type":"string"},"expires_at":{"type":"string"}},"required":["token","expires_at"]},"id":{"type":"number","title":"Primary key","description":"Primary key."},"email":{"type":"string","title":"Email address","description":"Email address."},"name":{"type":"string","title":"Name of the seller","description":"Name of the seller."},"mobile":{"type":"string","title":"Mobile number of the seller","description":"Mobile number of the seller."},"company":{"type":"string","title":"Belonged company name","description":"Belonged company name."},"created_at":{"type":"string","title":"Joined time","description":"Joined time."}},"required":["authorization","id","email","name","mobile","company","created_at"]},"ISeller.ILogin":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"]},"ISeller.IChangePassword":{"type":"object","properties":{"old_password":{"type":"string"},"new_password":{"type":"string"}},"required":["old_password","new_password"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/status/swagger.json b/test/features/status/swagger.json index 60fb5ed97..b2eb81a9a 100644 --- a/test/features/status/swagger.json +++ b/test/features/status/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/status/random":{"get":{"tags":[],"parameters":[],"responses":{"300":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/status/random":{"get":{"tags":[],"parameters":[],"responses":{"300":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}}}}},"components":{"schemas":{"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","files","created_at"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/swagger-customizer/swagger.json b/test/features/swagger-customizer/swagger.json index 7d70d307b..699f47f61 100644 --- a/test/features/swagger-customizer/swagger.json +++ b/test/features/swagger-customizer/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.6.0", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { diff --git a/test/features/swagger-example/swagger.json b/test/features/swagger-example/swagger.json index aa5ef58c4..50446f425 100644 --- a/test/features/swagger-example/swagger.json +++ b/test/features/swagger-example/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.7.0-dev.20240711", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { @@ -27,72 +27,41 @@ "$ref": "#/components/schemas/IBbsArticle.ICreate" }, "example": { - "title": "wanfi", - "body": "dihsfonqr", + "title": "gljuciiritfzguqcsewgmvvhgbpdubfajjxojcbgw", + "body": "pnnxfy", "files": [ { "name": null, - "extension": null, - "url": "https://xkjzcsqgah.mac" - }, - { - "name": null, - "extension": "ib", - "url": "https://hjbkzabvyu.tif" - }, - { - "name": null, - "extension": null, - "url": "https://hgfibjpkhm.wqw" + "extension": "t", + "url": "https://xfjgkeycgl.wut" } ] }, "examples": { "z": { - "title": "niuzm", - "body": "vjhlv", + "title": "oud", + "body": "mvxpttv", "files": [ { - "name": "kswkxztzbvpoxuupjqdtsvwfkqwmxzyvxysehydczvzwmmpdlaxsttxtnvezzzodlkpsdfsrhhbzuofrcmlettknvjdgdkkhqo", - "extension": "ew", - "url": "https://aqsgnjktsl.aca" - }, - { - "name": "gnwumdwsaldlmzhkgacrxrtvjyynwndltwmqfcxokhjpsqwrbedfjbsfzacdoicaqoxlqbtwntkdbanhnozeyfkcvjipdrokqgvvfbowtckgzsvdmcbhdelrvwmiqbonterexgsxxbeepqgsexiytgvxzniivekgpfikv", + "name": "cuyuszfaknwbvoznfofelljznnidfanpvuxbtcxhtmgofiquplylajniueeesgsclnewpbasv", "extension": null, - "url": "https://aggfmwklav.ijm" + "url": "https://legqqwmhff.btk" }, { - "name": "zgmfcdxldnprbxrlhqidfpzofjamgcyvzfrtlzquqjitlczyqnuqcmkbwxueerffstugbokobjgcrejzejbixsthbemqvwmkwbxhleafajqukfnucjauwdsneapgosjnxtjwlgzyaobbaxvgavwmjwhggiird", - "extension": "nyi", - "url": "https://sbufdobevq.gec" + "name": null, + "extension": null, + "url": "https://upyucrazeh.ait" } ] }, "y": { - "title": "mzgy", - "body": "uymevmpdas", - "files": [ - { - "name": "ptouplqcgjcqitusvvhnszwowspyxcpvdmtdgnyhxyxydnca", - "extension": null, - "url": "https://verdfefmjz.xhg" - }, - { - "name": "mjitvwkigmahrcvdhrqobraiipcblptprqoozhetzzzlktfdc", - "extension": null, - "url": "https://jqqizhyzom.tte" - }, - { - "name": "reswhbdndrlcozgkwwywvkjgycowdoqneqwhopcvhrgtmalpbgfzhvrfwdbdixyhxdvtzzdwmciwpjyadcpnkoyksyqkpphhlirjxsmkvymigaqkaybmiavrrbaopobepjgkmvoaszilkkpdnjytdwatmsrvfiuodqdmmqharqekemjslifyawmckxcbzycyxatzaionxqxoyqnnbohscelnlimnjjbjfohcwyqydoud", - "extension": "y", - "url": "https://pjmpsvxacs.smz" - } - ] + "title": "lrzfvxecxg", + "body": "bwdvpt", + "files": [] }, "x": { - "title": "tiwfhcbficjthjsvhkxvcrmk", - "body": "ksakxgg", + "title": "sluwgomzpsgbk", + "body": "gkidms", "files": [] } } @@ -109,22 +78,11 @@ "$ref": "#/components/schemas/IBbsArticle" }, "example": { - "id": "471cf11d-fe9a-44ec-95fe-9b36a177af20", - "created_at": "2024-07-12T03:10:03.714Z", - "title": "hbojqusfxdxvdeumyugbt", - "body": "bbjwbm", - "files": [ - { - "name": null, - "extension": null, - "url": "https://tdregslzcx.rbw" - }, - { - "name": "ngzzatngkilxidnygwarylmeootqeptfciryqazlsonievuxwargfvoisyhwvaoiiprxqgzysyxynxlkvylwkanhcztsqostlhtrecxuullppeszurangxxqwgjxjfqsippawrugziwdotpqpztvfpvzjvopspxxrpiaogongkdgati", - "extension": null, - "url": "https://sfmxgrvujc.dpk" - } - ] + "id": "66b8dd9b-08c4-4d90-916a-5313843ab8b9", + "created_at": "2024-07-29T06:09:44.936Z", + "title": "evjyojyjzhvepeguizgdt", + "body": "vfhvnajb", + "files": [] } } } @@ -146,7 +104,7 @@ "format": "uuid" }, "required": true, - "example": "67595ae0-0f6a-4cc6-a0a3-2ad88d186199" + "example": "3de8b0da-5c15-473d-8878-cfab3dc17125" } ], "requestBody": { @@ -156,8 +114,7 @@ "$ref": "#/components/schemas/PartialIBbsArticle.ICreate" }, "example": { - "title": "yysmaicfrvejhzg", - "files": [] + "title": "elspecczygawzshfrhprpir" } } }, @@ -172,64 +129,37 @@ "$ref": "#/components/schemas/IBbsArticle" }, "example": { - "id": "e313fb9a-5105-43e2-8f8c-fd625afb667b", - "created_at": "2024-06-30T01:01:50.475Z", - "title": "ogrjjzcaanrypgenncvdnlehukaoaj", - "body": "iyduciryf", + "id": "d6c41f21-2445-493d-98f4-528f2d236afa", + "created_at": "2024-07-10T07:21:06.797Z", + "title": "ydeuczo", + "body": "bqesjadq", "files": [ { - "name": null, + "name": "uiqvaehqakmaiycbkcinxlcfwlmyjsctbfwkdtmrmzaesaaikuatghpgdbo", "extension": null, - "url": "https://wnwxqgwygx.vwq" + "url": "https://rtttknuoyb.tlg" }, { "name": null, - "extension": null, - "url": "https://bknprzutya.kgf" - }, - { - "name": "znhhzvhymyuybosvhteocafvhigeeufyyouasqxvxwsbwnjxwohriihuwbirgrzfvby", - "extension": null, - "url": "https://rdxqfffvss.orf" + "extension": "fbfk", + "url": "https://qwyodmkoch.uvt" } ] }, "examples": { "b": { - "id": "9624d317-b124-4cbc-8ee0-4ce817df45e2", - "created_at": "2024-07-13T07:30:24.155Z", - "title": "prxcmgnwiohign", - "body": "ilvyb", - "files": [ - { - "name": null, - "extension": null, - "url": "https://bkmcmcvanp.toi" - }, - { - "name": null, - "extension": "xqyu", - "url": "https://pqiytxcovf.fnj" - }, - { - "name": "qxsiowaknproxtrmecuwwdsenrteikthzughrnkjlgyorwsdqjrz", - "extension": "oqnyw", - "url": "https://ciavlfjiyo.mju" - } - ] + "id": "79fa7124-0032-4315-aece-a1634284a483", + "created_at": "2024-07-26T04:55:54.384Z", + "title": "bioodawghjewmvtpdszfntqlrrzzvkauhxoxlzcpcutclz", + "body": "qchmizwd", + "files": [] }, "a": { - "id": "b1637c66-155a-4e65-9f7f-2c9774ac14d7", - "created_at": "2024-07-12T20:26:05.146Z", - "title": "xahjxavbornuphosaqojvi", - "body": "kenhbvfz", - "files": [ - { - "name": "fxpbzvjffasupllrbzmwlgsdbryyybgfhnfgqvvgshvpweafebhvtagtcyoruneimzxwsrniqviqefbcbydsnmtilpnawoacaqrqlenypnmjzzgggwwvuixxdcybeppzmcvdshzvjmegxzjuybyxcbdeuksgyptbnhcrmfxcslebhcjzsutgdhfktbvceusaeezbvijppsagyrxifvxvxfddleklhcebdvlyjogjfnabxddnaicwfvisxaywu", - "extension": "dydhfuyx", - "url": "https://byoyitpyli.vjq" - } - ] + "id": "17bc1331-9d2f-42c5-a5ef-7432a732b7bb", + "created_at": "2024-07-06T05:12:51.419Z", + "title": "obhvybuxthguenowufvligqcajbenfbsvmzcmylrngjmsmnr", + "body": "vkmrctefaf", + "files": [] } } } diff --git a/test/features/tags/swagger.json b/test/features/tags/swagger.json index 7542fc6e3..270ccb466 100644 --- a/test/features/tags/swagger.json +++ b/test/features/tags/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.6.0", + "version": "3.8.0-dev.20240722-2", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { diff --git a/test/features/variable/swagger.json b/test/features/variable/swagger.json index b7c119359..3f452aa82 100644 --- a/test/features/variable/swagger.json +++ b/test/features/variable/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/package/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/package/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."},"delete":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":""}},"summary":"Delete an article","description":"Delete an article."}},"/bbs/package/{section}/articles/new/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"required":true,"description":" Target data"}],"responses":{"200":{"description":"The new article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get new article of a day","description":"Get new article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/package/{section}/articles":{"patch":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"}],"requestBody":{"description":"Page request info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPage.IRequest"}}},"required":true},"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles","description":"Paginate entire articles."},"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string"}]},"required":true,"description":" Section code"},{"name":"page","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false},{"name":"limit","in":"query","schema":{"oneOf":[{"type":"null"},{"type":"integer"}]},"required":false}],"responses":{"200":{"description":"Paginated articles with summarized info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPageIBbsArticle.ISummary"}}}}},"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.)."},"post":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"}],"requestBody":{"description":"Content to store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"201":{"description":"Newly archived article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Store a new article","description":"Store a new article."}},"/bbs/package/{section}/articles/{id}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"oneOf":[{"type":"null"},{"type":"string","format":"uuid"}]},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":"Detailed article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Read an article","description":"Read an article."},"put":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"requestBody":{"description":"Content to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle.IStore"}}},"required":true},"responses":{"200":{"description":"Updated content","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Update an article","description":"Update an article."},"delete":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"id","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":" Target article ID"}],"responses":{"200":{"description":""}},"summary":"Delete an article","description":"Delete an article."}},"/bbs/package/{section}/articles/new/{date}":{"get":{"tags":[],"parameters":[{"name":"section","in":"path","schema":{"type":"string"},"required":true,"description":" Section code"},{"name":"date","in":"path","schema":{"type":"string","format":"date"},"required":true,"description":" Target data"}],"responses":{"200":{"description":"The new article info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBbsArticle"}}}}},"summary":"Get new article of a day","description":"Get new article of a day."}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}}},"components":{"schemas":{"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"IPageIBbsArticle.ISummary":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IBbsArticle.ISummary"}},"pagination":{"$ref":"#/components/schemas/IPage.IPagination"}},"required":["data","pagination"]},"IBbsArticle.ISummary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"writer":{"type":"string"},"title":{"type":"string","minLength":3,"maxLength":50},"created_at":{"type":"string","format":"date-time"}},"required":["id","section","writer","title","created_at"]},"IPage.IPagination":{"type":"object","properties":{"current":{"type":"integer"},"limit":{"type":"integer"},"records":{"type":"integer"},"pages":{"type":"integer"}},"required":["current","limit","records","pages"],"description":"Page information."},"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"section":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["id","section","created_at","title","body","files"]},"IAttachmentFile":{"type":"object","properties":{"name":{"oneOf":[{"type":"null"},{"type":"string","maxLength":255}]},"extension":{"oneOf":[{"type":"null"},{"type":"string","minLength":1,"maxLength":8}]},"url":{"type":"string","format":"uri"}},"required":["name","extension","url"]},"IBbsArticle.IStore":{"type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":50},"body":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IAttachmentFile"}}},"required":["title","body","files"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"number"},"userCPUTime":{"type":"number"},"voluntaryContextSwitches":{"type":"number"}},"required":["fsRead","fsWrite","involuntaryContextSwitches","ipcReceived","ipcSent","majorPageFault","maxRSS","minorPageFault","sharedMemorySize","signalsCount","swappedOut","systemCPUTime","unsharedDataSize","unsharedStackSize","userCPUTime","voluntaryContextSwitches"]}},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/websocket-clone/swagger.json b/test/features/websocket-clone/swagger.json index d28d15f43..fa26c3ee1 100644 --- a/test/features/websocket-clone/swagger.json +++ b/test/features/websocket-clone/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/websocket/swagger.json b/test/features/websocket/swagger.json index d28d15f43..fa26c3ee1 100644 --- a/test/features/websocket/swagger.json +++ b/test/features/websocket/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.6.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file +{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.8.0-dev.20240722-2","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":""}}}}},"components":{"schemas":{},"securitySchemes":{"bearer":{"type":"apiKey","in":"header","name":"Authorization"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/package.json b/test/package.json index 52098371a..a1318b90c 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.7.2", + "version": "3.8.0", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,13 +26,13 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.7.2", + "@nestia/sdk": "^3.8.0", "@nestjs/swagger": "^7.1.2", "@samchon/openapi": "^0.4.2", "@types/express": "^4.17.17", "@types/node": "20.11.16", "@types/uuid": "^9.0.8", - "nestia": "^5.3.0", + "nestia": "^5.5.0-dev.20240722", "ts-node": "^10.9.2", "ts-patch": "v3.2.1", "typescript": "^5.5.2", @@ -40,16 +40,16 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.7.2", + "@nestia/core": "^3.8.0", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.7.2", + "@nestia/fetcher": "^3.8.0", "@nestjs/common": "^10.3.5", "@nestjs/core": "^10.3.5", "@nestjs/platform-express": "^10.3.5", "@nestjs/platform-fastify": "^10.3.5", "tgrid": "^1.0.2", "tstl": "^3.0.0", - "typia": "^6.5.2", + "typia": "^6.5.4", "uuid": "^9.0.1" } } \ No newline at end of file diff --git a/website/package.json b/website/package.json index ae256be1d..f1cb68d4f 100644 --- a/website/package.json +++ b/website/package.json @@ -34,7 +34,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.5.2" + "typia": "^6.5.4" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", From 24330a39c85d7f693b5de4d3dd9d3c011e306d72 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 23 Jul 2024 03:05:25 +0900 Subject: [PATCH 039/204] Documentation of OpenAI function calling schemas generator. --- website/package-lock.json | 8 +- website/pages/docs/index.mdx | 1 + website/pages/docs/sdk/_meta.json | 1 + website/pages/docs/sdk/openai.mdx | 933 +++++++++++++++++++++++++++++ website/pages/docs/sdk/sdk.mdx | 28 +- website/pages/docs/sdk/swagger.mdx | 30 +- 6 files changed, 982 insertions(+), 19 deletions(-) create mode 100644 website/pages/docs/sdk/openai.mdx diff --git a/website/package-lock.json b/website/package-lock.json index 6f3622f6b..73b47ff2e 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -25,7 +25,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-mui-fileuploader": "^0.5.2", - "typia": "^6.5.2" + "typia": "^6.5.4" }, "devDependencies": { "@trivago/prettier-plugin-sort-imports": "^4.3.0", @@ -7854,9 +7854,9 @@ } }, "node_modules/typia": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/typia/-/typia-6.5.2.tgz", - "integrity": "sha512-s1yqB7m8Zz4yoeLdq1OQ7Nq/svHqOr02fl9B3dOiU7m+4p5wHvJVTj7gLRtq0t51ExFUlDzSkY9STwBUNACOgA==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/typia/-/typia-6.5.4.tgz", + "integrity": "sha512-4+oiWrLree/AgjiqVaQEOlaVDIKQkbsKmC9Tyhrsk4n7znjP7EHjRX9TIcN0q1ACfGTcwlf+ZBf5qQW/MEPRuw==", "dependencies": { "@samchon/openapi": "^0.4.2", "commander": "^10.0.0", diff --git a/website/pages/docs/index.mdx b/website/pages/docs/index.mdx index ef4fbef9a..063b57676 100644 --- a/website/pages/docs/index.mdx +++ b/website/pages/docs/index.mdx @@ -51,6 +51,7 @@ Nestia is a set of helper libraries for [NestJS](https://docs.nestjs.com), suppo - Advanced WebSocket routes - `@nestia/sdk`: - Swagger generator evolved than ever + - OpenAI function calling schema generator - SDK library generator for clients - Mockup Simulator for client developers - Automatic E2E test functions generator diff --git a/website/pages/docs/sdk/_meta.json b/website/pages/docs/sdk/_meta.json index d70c2e71e..0690fc1af 100644 --- a/website/pages/docs/sdk/_meta.json +++ b/website/pages/docs/sdk/_meta.json @@ -1,5 +1,6 @@ { "swagger": "Swagger Documents", + "openai": "OpenAI Function Call", "sdk": "S/W Development Kit", "simulator": "Mockup Simulator", "e2e": "E2E Test Functions" diff --git a/website/pages/docs/sdk/openai.mdx b/website/pages/docs/sdk/openai.mdx new file mode 100644 index 000000000..7393b925d --- /dev/null +++ b/website/pages/docs/sdk/openai.mdx @@ -0,0 +1,933 @@ +import { Tab, Tabs } from "nextra-theme-docs"; + +## Outline + + +```typescript copy filename="nestia.config.ts" showLineNumbers +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; + +import { YourModule } from "./src/YourModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: async () => { + const app = await NestFactory.create(YourModule); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); + // app.setGlobalPrefix("api"); + // app.enableVersioning({ + // type: VersioningType.URI, + // prefix: "v", + // }) + return app; + }, + openai: { + output: "dist/openai.json", + keyword: true, + beautify: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```bash filename="Terminal" showLineNumbers +npx nestia openai +``` + + + +Configure [`nestia.config.ts`](#nestiaconfigts) file and run `npx nestia openai` command. + +Then, `@nestia/openai` will analyze your NestJS backend server code, and generate `openai.json` file. The `openai.json` file contains the information of [OpenAI function calling schemas](https://platform.openai.com/docs/guides/function-calling), so that you can develop OpenAI function calling agent service with it. + +For reference, the `@nestia/sdk` generated OpenAI function calling schemas are following the type definitions of [`@wrtnio/openai-function-schema`](https://github.com/wrtnio/openai-function-schema) package. As it provides the function call executor and schema separator to LLM (Large Language Model) and human parts, you can easily develop the OpenAI function calling agent service with `@nestia/sdk` and [`@wrtnio/openai-function-schema`](https://github.com/wrtnio/openai-function-schema). + + + + +## Configuration +### Application Module +nestia.config.ts, + INestiaConfig.ts, +]}> + +```typescript copy filename="nestia.config.ts" showLineNumbers {18-22} +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; +// import { FastifyAdapter } from "@nestjs/platform-fastify"; + +import { YourModule } from "./src/YourModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: async () => { + const app = await NestFactory.create(YourModule); + // const app = await NestFactory.create(YourModule, new FastifyAdapter()); + // app.setGlobalPrefix("api"); + // app.enableVersioning({ + // type: VersioningType.URI, + // prefix: "v", + // }) + return app; + }, + openai: { + output: "dist/openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript filename="INestiaConfig.ts" showLineNumbers {11-18, 173-259} +import type { INestApplication } from "@nestjs/common"; +import { OpenApi } from "@samchon/openapi"; +import { IOpenAiSchema } from "@wrtnio/openai-function-schema"; + +/** + * Definition for the `nestia.config.ts` file. + * + * @author Jeongho Nam - https://github.com/samchon + */ +export interface INestiaConfig { + /** + * Configuration for the OpenAI funtion call schema generation. + * + * You can generate the schema for the OpenAI function call through + * this configuration. Recommend to use the function call schemas with + * the {@link swagger} document. + */ + openai?: INestiaConfig.IOpenAiConnfig; + + /** + * Accessor of controller classes. + * + * You can specify target controller classes within two ways. + * + * - Asynchronous function returning `INestApplication` instance + * - Specify the path or directory of controller class files + */ + input: + | (() => Promise) + | INestiaConfig.IInput + | string[] + | string; + + /** + * Building `swagger.json` is also possible. + * + * If not specified, you can't build the `swagger.json`. + */ + swagger?: INestiaConfig.ISwaggerConfig; + + /** + * Output directory that SDK would be placed in. + * + * If not configured, you can't build the SDK library. + */ + output?: string; + + /** + * Target directory that SDK distribution files would be placed in. + * + * If you configure this property and runs `npx nestia sdk` command, + * distribution environments for the SDK library would be generated. + * + * After the SDK library generation, move to the `distribute` directory, + * and runs `npm publish` command, then you can share SDK library with + * other client (frontend) developers. + * + * Recommend to use `"packages/api"` value. + */ + distribute?: string; + + /** + * Allow simulation mode. + * + * If you configure this property to be `true`, the SDK library would be contain + * simulation mode. In the simulation mode, the SDK library would not communicate + * with the real backend server, but just returns random mock-up data + * with requestion data validation. + * + * For reference, random mock-up data would be generated by `typia.random()` + * function. + * + * @default false + */ + simulate?: boolean; + + /** + * Target directory that e2e test functions would be placed in. + * + * If you configure this property and runs `npx nestia e2e` command, + * `@nestia/sdk` will analyze your NestJS backend server code, and + * generates e2e test functions for every API endpoints. + * + * If not configured, you can't run `npx nestia e2e` command. + */ + e2e?: string; + + /** + * Whether to use propagation mode or not. + * + * If being configured, interaction functions of the SDK library would + * perform the propagation mode. The propagation mode means that never + * throwing exception even when status code is not 200 (or 201), but just + * returning the {@link IPropagation} typed instance, which can specify its body + * type through discriminated union determined by status code. + * + * @default false + */ + propagate?: boolean; + + /** + * Whether to clone DTO structures or not. + * + * If being configured, all of DTOs used in the backend server would be cloned + * into the `structures` directory, and the SDK library would be refer to the + * cloned DTOs instead of the original. + * + * @default false + */ + clone?: boolean; + + /** + * Whether to wrap DTO by primitive type. + * + * If you don't configure this property as `false`, all of DTOs in the + * SDK library would be automatically wrapped by {@link Primitive} type. + * + * For refenrece, if a DTO type be capsuled by the {@link Primitive} type, + * all of methods in the DTO type would be automatically erased. Also, if + * the DTO has a `toJSON()` method, the DTO type would be automatically + * converted to return type of the `toJSON()` method. + * + * @default true + */ + primitive?: boolean; + + /** + * Whether to assert parameter types or not. + * + * If you configure this property to be `true`, all of the function + * parameters of SDK library would be checked through + * [`typia.assert()` function](https://typia.io/docs/validators/assert/). + * + * This option would make your SDK library compilation time a little bit slower, + * but would enahcne the type safety even in the runtime level. + * + * @default false + */ + assert?: boolean; + + /** + * Whether to optimize JSON string conversion 10x faster or not. + * + * If you configure this property to be `true`, the SDK library would utilize the + * [`typia.assertStringify() function`](https://github.com/samchon/typia#enhanced-json) + * to boost up JSON serialization speed and ensure type safety. + * + * This option would make your SDK library compilation time a little bit slower, + * but would enhance JSON serialization speed 10x faster. Also, it can ensure type + * safety even in the rumtime level. + * + * @default false + */ + json?: boolean; +} +export namespace INestiaConfig { + /** + * List of files or directories to include or exclude to specifying the NestJS + * controllers. + */ + export interface IInput { + /** + * List of files or directories containing the NestJS controller classes. + */ + include: string[]; + + /** + * List of files or directories to be excluded. + */ + exclude?: string[]; + } + + /** + * Configuration for the OpenAI funtion call schema generation. + */ + export interface IOpenAiConnfig { + /** + * Output path of the `openai.json`. + * + * If you've configured only directory, the file name would be the `openai.json`. + * Otherwise you've configured the full path with file name and extension, the + * `openai.json` file would be renamed to it. + */ + output: string; + + /** + * Whether the parameters are keyworded or not. + * + * If this property value is `true`, length of the + * {@link IOpenAiDocument.IFunction.parameters} is always 1, and type of the + * pararameter is always {@link IOpenAiSchema.IObject} type. Also, its + * properties are following below rules: + * + * - `pathParameters`: Path parameters of {@link ISwaggerMigrateRoute.parameters} + * - `query`: Query parameter of {@link ISwaggerMigrateRoute.query} + * - `body`: Body parameter of {@link ISwaggerMigrateRoute.body} + * + * ```typescript + * { + * ...pathParameters, + * query, + * body, + * } + * ``` + * + * Otherwise (this property value is `false`), length of the + * {@link IOpenAiDocument.IFunction.parameters} is variable, and sequence of the + * parameters are following below rules. + * + * ```typescript + * [ + * ...pathParameters, + * ...(query ? [query] : []), + * ...(body ? [body] : []), + * ] + * ``` + * + * @default false + */ + keyword?: boolean; + + /** + * Separator function for the parameters. + * + * When composing parameter arguments through OpenAI function call, + * there can be a case that some parameters must be composed by human, or + * LLM cannot understand the parameter. For example, if the parameter type + * has configured {@link IOpenAiSchema.IString["x-wrtn-secret-key"]}, the + * secret key value must be composed by human, not by LLM (Large Language Model). + * + * In that case, if you configure this property with a function that + * predicating whether the schema value must be composed by human or not, + * the parameters would be separated into two parts. + * + * - {@link IOpenAiFunction.separated.llm} + * - {@link IOpenAiFunction.separated.human} + * + * When writing the function, note that returning value `true` means to be + * a human composing the value, and `false` means to LLM composing the value. + * Also, when predicating the schema, it would better to utilize the + * {@link OpenAiTypeChecker} features. + * + * @param schema Schema to be separated. + * @returns Whether the schema value must be composed by human or not. + * @default null + */ + separate?: null | ((schema: IOpenAiSchema) => boolean); + + /** + * Whether to beautify JSON content or not. + * + * If you configure this property to be `true`, the `openai.json` file would + * be beautified with indentation (2 spaces) and line breaks. If you configure + * numeric value instead, the indentation would be specified by the number. + * + * @default false + */ + beautify?: boolean | number; + } + + /** + * Building `swagger.json` is also possible. + */ + export interface ISwaggerConfig { + /** + * Output path of the `swagger.json`. + * + * If you've configured only directory, the file name would be the `swagger.json`. + * Otherwise you've configured the full path with file name and extension, the + * `swagger.json` file would be renamed to it. + */ + output: string; + + /** + * OpenAPI version. + * + * If you configure this property to be `2.0` or `3.0`, the newly generated + * `swagger.json` file would follow the specified OpenAPI version. The newly + * generated `swagger.json` file would be downgraded from the OpenAPI v3.1 + * specification by {@link OpenApi.downgrade} method. + * + * @default 3.1 + */ + openapi?: "2.0" | "3.0" | "3.1"; + + /** + * Whether to beautify JSON content or not. + * + * If you configure this property to be `true`, the `swagger.json` file would + * be beautified with indentation (2 spaces) and line breaks. If you configure + * numeric value instead, the indentation would be specified by the number. + * + * @default false + */ + beautify?: boolean | number; + + /** + * API information. + * + * If omitted, `package.json` content would be used instead. + */ + info?: Partial; + + /** + * List of server addresses. + */ + servers?: OpenApi.IServer[]; + + /** + * Security schemes. + * + * When generating `swagger.json` file through `nestia`, if your controllers or + * theirs methods have a security key which is not enrolled in here property, + * it would be an error. + */ + security?: Record; + + /** + * List of tag names with description. + * + * It is possible to omit this property or skip some tag name even if + * the tag name is used in the API routes. In that case, the tag name + * would be used without description. + * + * Of course, if you've written a comment like `@tag {name} {descrition}`, + * you can entirely replace this property specification. + */ + tags?: OpenApi.IDocument.ITag[]; + + /** + * Decompose query DTO. + * + * If you configure this property to be `true`, the query DTO would be decomposed + * into individual query parameters per each property. Otherwise you set it to be + * `false`, the query DTO would be one object type which contains all of query + * parameters. + * + * @default true + */ + decompose?: boolean; + + /** + * Operation ID generator. + * + * @param props Properties of the API endpoint. + * @returns Operation ID. + */ + operationId?(props: { + class: string; + function: string; + method: "HEAD" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; + path: string; + }): string; + } +} +``` + + + +Make `nestia.config.ts` file and run `npx nestia openai` command. + +At first, create `nestia.config.ts` file through `npx nestia init` command. It would be placed on the top level directory of your NestJS backend project. For reference, `tsconfig.json` file also must be placed in the top level directory, too. After creation, configure the `nestia.config.ts` file referencing above example code and type definition. + +At least, you've to configure those two properties: + + - `input`: Accessor of controller classes + - `openai.output`: Path of `openai.json` file + +When you've completed above configuration, just run `npx nestia swagger` command. Then, `openai.json` file would be newly generated, and placed into the `$config.swagger.output` directory following your `nestia.config.ts` configuration. + +### File Specification +`nestia.config.ts` supports alternative options specifying path of target controllers. + +If your backend application server does not have special configuration like `setGlobalPrefix`, `enableVersioning` and `RouterModule`, it is okay to specifying the target controller classes just by writing their file or directory paths like below. + + + +```typescript copy filename="nestia.config.ts" showLineNumbers {7-15} +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; + +import { YourModule } from "./src/YourModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: async () => { + const app = await NestFactory.create(YourModule); + // app.setGlobalPrefix("api"); + // app.enableVersioning({ + // type: VersioningType.URI, + // prefix: "v", + // }) + return app; + }, + openai: { + output: "dist/openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript copy filename="nestia.config.ts" showLineNumbers {8-16} +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; +import { FastifyAdapter } from "@nestjs/platform-fastify"; + +import { YourModule } from "./src/YourModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: async () => { + const app = await NestFactory.create(YourModule, new FastifyAdapter()); + // app.setGlobalPrefix("api"); + // app.enableVersioning({ + // type: VersioningType.URI, + // prefix: "v", + // }) + return app; + }, + openai: { + output: "dist/openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript copy filename="nestia.config.ts" showLineNumbers {4-8} +import { INestiaConfig } from "@nestia/sdk"; + +const NESTIA_CONFIG: INestiaConfig = { + input: [ + "src/controllers", + "src/fake/controllers", + "src/test/controllers" + ], + openai: { + output: "dist/openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript copy filename="nestia.config.ts" showLineNumbers {4} +import { INestiaConfig } from "@nestia/sdk"; + +const NESTIA_CONFIG: INestiaConfig = { + input: "src/**/*.controller.ts", + openai: { + output: "dist/openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript copy filename="nestia.config.ts" showLineNumbers {4-7} +import { INestiaConfig } from "@nestia/sdk"; + +const NESTIA_CONFIG: INestiaConfig = { + input: { + include: ["src/controllers"], + exclude: ["src/**/*.fake.ts"], + }, + openai: { + output: "dist/openai.json", + beautify: true, + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + + +### Additional Properties + + - `openai.keyword`: Whether the parameters are keyworded or not. + - `openai.separate` + - `openai.beautify`: Whether to beautify JSON content or not. + +
    + See detailed options: +
    +```typescript filename="INestiaConfig.ts" showLineNumbers {15-87} +export namespace INestiaConfig { + /** + * Configuration for the OpenAI funtion call schema generation. + */ + export interface IOpenAiConnfig { + /** + * Output path of the `openai.json`. + * + * If you've configured only directory, the file name would be the `openai.json`. + * Otherwise you've configured the full path with file name and extension, the + * `openai.json` file would be renamed to it. + */ + output: string; + + /** + * Whether the parameters are keyworded or not. + * + * If this property value is `true`, length of the + * {@link IOpenAiDocument.IFunction.parameters} is always 1, and type of the + * pararameter is always {@link IOpenAiSchema.IObject} type. Also, its + * properties are following below rules: + * + * - `pathParameters`: Path parameters of {@link ISwaggerMigrateRoute.parameters} + * - `query`: Query parameter of {@link ISwaggerMigrateRoute.query} + * - `body`: Body parameter of {@link ISwaggerMigrateRoute.body} + * + * ```typescript + * { + * ...pathParameters, + * query, + * body, + * } + * ``` + * + * Otherwise (this property value is `false`), length of the + * {@link IOpenAiDocument.IFunction.parameters} is variable, and sequence of the + * parameters are following below rules. + * + * ```typescript + * [ + * ...pathParameters, + * ...(query ? [query] : []), + * ...(body ? [body] : []), + * ] + * ``` + * + * @default false + */ + keyword?: boolean; + + /** + * Separator function for the parameters. + * + * When composing parameter arguments through OpenAI function call, + * there can be a case that some parameters must be composed by human, or + * LLM cannot understand the parameter. For example, if the parameter type + * has configured {@link IOpenAiSchema.IString["x-wrtn-secret-key"]}, the + * secret key value must be composed by human, not by LLM (Large Language Model). + * + * In that case, if you configure this property with a function that + * predicating whether the schema value must be composed by human or not, + * the parameters would be separated into two parts. + * + * - {@link IOpenAiFunction.separated.llm} + * - {@link IOpenAiFunction.separated.human} + * + * When writing the function, note that returning value `true` means to be + * a human composing the value, and `false` means to LLM composing the value. + * Also, when predicating the schema, it would better to utilize the + * {@link OpenAiTypeChecker} features. + * + * @param schema Schema to be separated. + * @returns Whether the schema value must be composed by human or not. + * @default null + */ + separate?: null | ((schema: IOpenAiSchema) => boolean); + + /** + * Whether to beautify JSON content or not. + * + * If you configure this property to be `true`, the `openai.json` file would + * be beautified with indentation (2 spaces) and line breaks. If you configure + * numeric value instead, the indentation would be specified by the number. + * + * @default false + */ + beautify?: boolean | number; + } +} +``` +
    + +### CLI Arguments +```bash filename="Terminal" +npx nestia swagger +npx nestia swagger --config nestia2.config.ts +npx nestia swagger --project tsconfig2.json +npx nestia swagger --config nestia3.config.ts --project tsconfig3.tsconfig.json +``` + +If you have a special configuration file that its file name is not `nestia.config.ts` or the configuration file is not placed on the root directory of the project, you can specify it with `--config` option like `npx nestia swagger --config another.config.ts`. + +Also, if you have a special `tsconfig.json` file or the project file is not located in the root directory of the project, you can specify it with `--project` argument like `npx nestia swagger --project another.tsconfig.json`, too. + + + + +## Function Call Execution +### Positional +nestia.config.ts, + "Test Program Function", + ]} + defaultIndex={1}> + +```typescript filename="nestia.config.ts" showLineNumbers {10} +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; + +import { AppModule } from "./src/AppModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: () => NestFactory.create(AppModule), + openai: { + output: "dist/openai.json", + keyword: false, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript filename="test_fetcher_keyword_bbs_article_update.ts" showLineNumbers {21-30} +import { + IOpenAiDocument, + IOpenAiFunction, + OpenAiFetcher, +} from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import typia from "typia"; + +import { IBbsArticle } from "../../../api/structures/IBbsArticle"; + +const main = async (): Promise => { + // OPENAI FUNCTION CALL SCHEMAS + const document: IOpenAiDocument = JSON.parse( + await fs.promises.readFile("openai.json", "utf8"), + ); + + // EXECUTE OPENAI FUNCTION CALL + const func: IOpenAiFunction = document.functions.find( + (f) => f.method === "put" && f.path === "/bbs/articles", + )!; + const article: IBbsArticle = await OpenAiFetcher.execute({ + document, + function: func, + connection: { host: "http://localhost:3000" }, + arguments: [ + // imagine that arguments are composed by OpenAI + v4(), + typia.random(), + ], + }); + typia.assert(article); +}; +main().catch(console.error); +``` + + + +If you deliver `openai.json` file's function call schemas to the [OpenAI SDK](https://github.com/openai/openai-node), the OpenAI chatting agent will choose proper functions during the chatting, and composes argument values automatically to induce the function call executions. + +When the OpenAI SDK notifies you the target function to execute with argument values, just perform the function call executino by importing `OpenAiFetcher` module of [`@wrtnio/openai-function-schema`](https://wrtnio/openai-function-schema) and calling the `OpenAiFetcher.execute()` method of it. + +Above is the example code utilizin the `OpenAiFetcher.execute()` method. + +### Keyword +nestia.config.ts, + "Test Program Function", + ]} + defaultIndex={1}> + +```typescript filename="nestia.config.ts" showLineNumbers {10} +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; + +import { AppModule } from "./src/AppModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: () => NestFactory.create(AppModule), + openai: { + output: "dist/openai.json", + keyword: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript filename="test_fetcher_positional_bbs_article_update.ts" showLineNumbers {21-32} +import { + IOpenAiDocument, + IOpenAiFunction, + OpenAiFetcher, +} from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import typia from "typia"; + +import { IBbsArticle } from "../../../api/structures/IBbsArticle"; + +const main = async (): Promise => { + // OPENAI FUNCTION CALL SCHEMAS + const document: IOpenAiDocument = JSON.parse( + await fs.promises.readFile("openai.json", "utf8"), + ); + + // EXECUTE OPENAI FUNCTION CALL + const func: IOpenAiFunction = document.functions.find( + (f) => f.method === "put" && f.path === "/bbs/articles", + )!; + const article: IBbsArticle = await OpenAiFetcher.execute({ + document, + function: func, + connection: { host: "http://localhost:3000" }, + arguments: [ + // imagine that argument is composed by OpenAI + { + id: v4(), + body: typia.random(), + }, + ], + }); + typia.assert(article); +}; +main().catch(console.error); +``` + + + +If you've configured `openai.keyword` option of `nestia.config.ts` file to be `true`, every OpenAI function call schemas defined in the `openai.json` have only one parameter, and the parameter is always an object type. + +This is the concept of "keyworded parameter", keeping only one parameter by groupping every parameters into an object. This "keyworded parameter" mode is recommended due to the OpenAI makes more suitable argument values in rather than the non-keyworded parameter (positional parameters) case. + +Also, do not worry anything about re-construction of the parameters. The `OpenAiFetcher.execute()` method of [`@wrtnio/openai-function-schema`](https://wrtnio/openai-function-schema) will automatically decompose the object parameter into the positional parameters, and perform the function call execution. + +Just put the argument value composed from OpenAI, then `OpenAiFetcher.execute()` will do everything. + + + +### Separate +nestia.config.ts, + "Test Program Function", +]}> + +```typescript filename="nestia.config.ts" showLineNumbers +import { INestiaConfig } from "@nestia/sdk"; +import { NestFactory } from "@nestjs/core"; +import { IOpenAiSchema, OpenAiTypeChecker } from "@wrtnio/openai-function-schema"; + +import { AppModule } from "./src/AppModule"; + +const NESTIA_CONFIG: INestiaConfig = { + input: () => NestFactory.create(AppModule), + openai: { + output: "dist/openai.json", + keyword: true, + separate: (schema: IOpenAiSchema) => + OpenAiTypeChecker.isString(schema) && + (schema["x-wrtn-secret-key"] !== undefined || + schema["contentMediaType"] !== undefined), + beautify: true, + }, +}; +export default NESTIA_CONFIG; +``` + + +```typescript filename="test_combiner_keyword_parameters_query.ts" showLineNumbers +import { + IOpenAiDocument, + IOpenAiFunction, + IOpenAiSchema, + OpenAiDataCombiner, + OpenAiFetcher, + OpenAiTypeChecker, +} from "@wrtnio/openai-function-schema"; +import fs from "fs"; +import typia from "typia"; + +import { IMembership } from "../../api/structures/IMembership"; + +const main = async (): Promise => { + // OPENAI FUNCTION CALL SCHEMAS + const document: IOpenAiDocument = JSON.parse( + await fs.promises.readFile("openai.json", "utf8"), + ); + + // EXECUTE OPENAI FUNCTION CALL + const func: IOpenAiFunction = document.functions.find( + (f) => f.method === "patch" && f.path === "/membership/change", + )!; + const membership: IMembership = await OpenAiFetcher.execute({ + document, + function: func, + connection: { host: "http://localhost:3000" }, + arguments: OpenAiDataCombiner.parameters({ + function: func, + llm: [ + // imagine that below argument is composed by OpenAI + { + body: { + name: "Wrtn Technologies", + email: "master@wrtn.io", + password: "1234", + age: 20, + gender: 1, + }, + }, + ], + human: [ + // imagine that below argument is composed by human + { + query: { + secret: "something", + }, + body: { + secretKey: "something", + picture: "https://wrtn.io/logo.png", + }, + }, + ], + }), + }); + typia.assert(membership); +}; +main().catch(console.error); +``` + + + +At last, there can be some special API operation that some arguments must be composed by user, not by LLM (Large Language Model). For example, if an API operation requires file uploading or secret key identifier, it must be composed by user manually in the frontend application side. + +For such case, `nestia.config.ts` file supports special option `openai.separate`. If you configure the callback function, it would be utilized for determining whether the value must be composed by user or not. When the arguments are composed by both user and LLM sides, you can combine them into one through `OpenAiDataComposer.parameters()` method, so that you can still execute the function calling with `OpenAiFetcher.execute()` method. + +Above is the example code of such special case. \ No newline at end of file diff --git a/website/pages/docs/sdk/sdk.mdx b/website/pages/docs/sdk/sdk.mdx index 57060f83e..992b13dce 100644 --- a/website/pages/docs/sdk/sdk.mdx +++ b/website/pages/docs/sdk/sdk.mdx @@ -32,7 +32,6 @@ export default NESTIA_CONFIG; ```bash filename="Terminal" showLineNumbers {} npx nestia sdk -npx nestia sdk --config nestia.config.ts --project tsconfig.json ``` @@ -103,11 +102,13 @@ export namespace update { Collection of typed `fetch` functions with DTO structures. -Configure [`nestia.config.ts`](#nestiaconfigts) file and run `npx nestia sdk` command. Then, `@nestia/sdk` will analyze your NestJS backend server code, and generate SDK (Software Development Kit) library composed with. The newly generated SDK library would be composed with `DTO` and `fetch` functions with type definitions following your NestJS server. +Configure [`nestia.config.ts`](#nestiaconfigts) file and run `npx nestia sdk` command. -With the SDK library composed with RPC (Remote Procedure Call) functions, you can easily develop e2e test program. Also, frontend developers can utilize the SDK library to interact with your NestJS backend server, much safely and conveniently. If you can't imagine how the SDK library works, then look at the gif image of below. Left side is the NestJS backend server program, and right side is the Frontend program interacting with your server. +Then, `@nestia/sdk` will analyze your NestJS backend server code, and generate SDK (Software Development Kit) library composed with. The newly generated SDK library would be composed with `DTO` and `fetch` functions with type definitions following your NestJS server. -Isn't it look like much more convenient and safer than before when using [Swagger Documents](swagger)? +With the SDK library composed with RPC (Remote Procedure Call) functions, you can easily develop e2e test program. Also, frontend developers can utilize the SDK library to interact with your NestJS backend server, much safely and conveniently. + +If you can't imagine how the SDK library works, then look at the gif image of below. Left side is the NestJS backend server program, and right side is the Frontend program interacting with your server. Isn't it look like much more convenient and safer than before [Swagger Documents](swagger) case? ![SDK](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif) @@ -117,7 +118,7 @@ Isn't it look like much more convenient and safer than before when using [Swagge ## Configuration -### `nestia.config.ts` +### Application Module nestia.config.ts, INestiaConfig.ts, @@ -410,7 +411,7 @@ At least, you've to configure those two properties: When you've completed above configuration, just run `npx nestia sdk` command. Then, SDK library would be newly generated, and placed into the `$config.output` directory following your `nestia.config.ts` configuration. -### Input Pattern +### File Specification `nestia.config.ts` supports alternative options instead of using the `Module` instance. If your backend application server does not have special configuration like `setGlobalPrefix`, `enableVersioning` and `RouterModule`, it is okay to specifying the target controller classes just by writing their file path like below. @@ -648,9 +649,6 @@ This `clone` mode is useful when you'd not separated DTO structures from the ORM In that case, it would better to remove the dependency by using this `clone` mode. - - - ### Propagation Mode nestia.config.ts, @@ -923,6 +921,18 @@ if (output.success) { +### CLI Arguments +```bash filename="Terminal" +npx nestia sdk +npx nestia sdk --config nestia2.config.ts +npx nestia sdk --project tsconfig2.json +npx nestia sdk --config nestia3.config.ts --project tsconfig3.tsconfig.json +``` + +If you have a special configuration file that its file name is not `nestia.config.ts` or the configuration file is not placed on the root directory of the project, you can specify it with `--config` option like `npx nestia sdk --config another.config.ts`. + +Also, if you have a special `tsconfig.json` file or the project file is not located in the root directory of the project, you can specify it with `--project` argument like `npx nestia sdk --project another.tsconfig.json`, too. + diff --git a/website/pages/docs/sdk/swagger.mdx b/website/pages/docs/sdk/swagger.mdx index 7b7f1baed..ed1c4a2d9 100644 --- a/website/pages/docs/sdk/swagger.mdx +++ b/website/pages/docs/sdk/swagger.mdx @@ -27,7 +27,6 @@ const NESTIA_CONFIG: INestiaConfig = { swagger: { openapi: "3.1", output: "dist/swagger.json", - beautify: true, security: { bearer: { type: "apiKey", @@ -41,6 +40,7 @@ const NESTIA_CONFIG: INestiaConfig = { description: "Local Server", }, ], + beautify: true, }, }; export default NESTIA_CONFIG; @@ -49,7 +49,6 @@ export default NESTIA_CONFIG; ```bash filename="Terminal" showLineNumbers {} npx nestia swagger -npx nestia swagger --config nestia.config.ts --project tsconfig.json ``` @@ -58,12 +57,11 @@ Configure [`nestia.config.ts`](#nestiaconfigts) file and run `npx nestia swagger Then, `@nestia/sdk` will analyze your NestJS backend server code, and generate `swagger.json` file. -If you have a special configuration file that its file name is not `nestia.config.ts`, you can specify it with `--config` option like `npx nestia swagger --config another.config.ts`. Also, if you have a special `tsconfig.json` file, you can specify it with `--project` option like `npx nestia swagger --project another.tsconfig.json`, too. - ## Configuration +### Application Module nestia.config.ts, INestiaConfig.ts, @@ -445,7 +443,10 @@ At least, you've to configure those two properties: When you've completed above configuration, just run `npx nestia swagger` command. Then, `swagger.json` file would be newly generated, and placed into the `$config.swagger.output` directory following your `nestia.config.ts` configuration. -By the way, `nestia.config.ts` supports alternative options specifying the target controller classes instead of using the `Module` instance. If your backend application server does not have special configuration like `setGlobalPrefix`, `enableVersioning` and `RouterModule`, it is okay to specifying the target controller classes just by writing their file path like below. +### File Specification +`nestia.config.ts` supports alternative options specifying path of target controllers. + +If your backend application server does not have special configuration like `setGlobalPrefix`, `enableVersioning` and `RouterModule`, it is okay to specifying the target controller classes just by writing their file or directory paths like below. +### Additional Properties Additionally, you can configure the `swagger` property in the `nestia.config.ts` file. - `swagger.openapi`: OpenAPI version specification. @@ -641,6 +643,10 @@ Additionally, you can configure the `swagger` property in the `nestia.config.ts` - `swagger.decompose`: Whether to decompose query DTO as individual parameters. - `swagger.operationId`: Operation ID genereator. +For reference, if you do not configure `swagger.info` property or omit some members of the information instance, `@nestia/sdk` will utilize your `package.json` file content instead. For example, if you omit the `swagger.info.version`, your `package.json` file's `version` property would be written instead. + +Also, whether you configure `swagger.openapi` version or not, the newly generated `swagger.file` starts from the [OpenAPI v3.1 specification](https://github.com/samchon/openapi/blob/master/src/OpenApi.ts) emended by [`@samchon/openapi`](https://github.com/samchon/openapi). If your target OpenAPI version is lower than v3.1, `@nestia/sdk` just downgrades the newly generated OpenAPI v3.1 content by calling [`OpenApi.downgrade()`](https://github.com/samchon/openapi/blob/master/src/OpenApi.ts) function. +
    See detailed options:
    @@ -745,6 +751,18 @@ export namespace INestiaConfig {
    +### CLI Arguments +```bash filename="Terminal" +npx nestia swagger +npx nestia swagger --config nestia2.config.ts +npx nestia swagger --project tsconfig2.json +npx nestia swagger --config nestia3.config.ts --project tsconfig3.tsconfig.json +``` + +If you have a special configuration file that its file name is not `nestia.config.ts` or the configuration file is not placed on the root directory of the project, you can specify it with `--config` option like `npx nestia swagger --config another.config.ts`. + +Also, if you have a special `tsconfig.json` file or the project file is not located in the root directory of the project, you can specify it with `--project` argument like `npx nestia swagger --project another.tsconfig.json`, too. + @@ -1798,7 +1816,7 @@ export class CustomController { ## Distribution You can choose two options for `swagger.json` file distribution. -The 1st is publishing the `swagger.json` file in a public repo, and showing it through Swagger Editor like below: +The 1st is publishing the `swagger.json` file in a public repo, and showing it through [`@nestia/editor`](/docs/editor) like below: {