From 68c814f5db3f9fa1c1c192fd4ab8f78a245904d8 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 17 Jul 2024 15:05:00 +0900 Subject: [PATCH] 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",