diff --git a/package.json b/package.json index 4a4d7d76f..538f8285e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@nestia/station", - "version": "3.19.0-dev.20241111", + "version": "3.19.1", "description": "Nestia station", "scripts": { "build": "node build/index.js", diff --git a/packages/core/package.json b/packages/core/package.json index f255036eb..015a6dcf9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/core", - "version": "3.19.0-dev.20241111", + "version": "3.19.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.19.0-dev.20241111", + "@nestia/fetcher": "^3.19.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "@samchon/openapi": "^1.2.2", @@ -53,7 +53,7 @@ "ws": "^7.5.3" }, "peerDependencies": { - "@nestia/fetcher": ">=3.19.0-dev.20241111", + "@nestia/fetcher": ">=3.19.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/core/src/decorators/PlainBody.ts b/packages/core/src/decorators/PlainBody.ts index cd3ab4e89..c9cf3ccc3 100644 --- a/packages/core/src/decorators/PlainBody.ts +++ b/packages/core/src/decorators/PlainBody.ts @@ -8,6 +8,7 @@ import type { FastifyRequest } from "fastify"; import { assert } from "typia"; import { get_text_body } from "./internal/get_text_body"; +import { is_request_body_undefined } from "./internal/is_request_body_undefined"; import { validate_request_body } from "./internal/validate_request_body"; /** @@ -52,7 +53,12 @@ export function PlainBody( const request: express.Request | FastifyRequest = context .switchToHttp() .getRequest(); - if (!isTextPlain(request.headers["content-type"])) + if ( + is_request_body_undefined(request) && + (checker ?? (() => null))(undefined as any) === null + ) + return undefined; + else if (!isTextPlain(request.headers["content-type"])) throw new BadRequestException(`Request body type is not "text/plain".`); const value: string = await get_text_body(request); if (checker) { diff --git a/packages/core/src/decorators/TypedBody.ts b/packages/core/src/decorators/TypedBody.ts index 0c4080183..4bb322575 100644 --- a/packages/core/src/decorators/TypedBody.ts +++ b/packages/core/src/decorators/TypedBody.ts @@ -8,6 +8,7 @@ import type { FastifyRequest } from "fastify"; import { assert, is, misc, validate } from "typia"; import { IRequestBodyValidator } from "../options/IRequestBodyValidator"; +import { is_request_body_undefined } from "./internal/is_request_body_undefined"; import { validate_request_body } from "./internal/validate_request_body"; /** @@ -35,7 +36,9 @@ export function TypedBody( const request: express.Request | FastifyRequest = context .switchToHttp() .getRequest(); - if (isApplicationJson(request.headers["content-type"]) === false) + if (is_request_body_undefined(request) && checker(undefined as T) === null) + return undefined; + else if (isApplicationJson(request.headers["content-type"]) === false) throw new BadRequestException( `Request body type is not "application/json".`, ); diff --git a/packages/core/src/decorators/internal/is_request_body_undefined.ts b/packages/core/src/decorators/internal/is_request_body_undefined.ts new file mode 100644 index 000000000..f8c8586ff --- /dev/null +++ b/packages/core/src/decorators/internal/is_request_body_undefined.ts @@ -0,0 +1,14 @@ +import type express from "express"; +import type { FastifyRequest } from "fastify"; + +/** + * @internal + */ +export const is_request_body_undefined = ( + request: express.Request | FastifyRequest, +): boolean => + request.headers["content-type"] === undefined && + (request.body === undefined || + (typeof request.body === "object" && + request.body !== null && + Object.keys(request.body).length === 0)); diff --git a/packages/core/src/programmers/PlainBodyProgrammer.ts b/packages/core/src/programmers/PlainBodyProgrammer.ts index 78ce325e3..0da036971 100644 --- a/packages/core/src/programmers/PlainBodyProgrammer.ts +++ b/packages/core/src/programmers/PlainBodyProgrammer.ts @@ -44,7 +44,6 @@ const validate = (metadata: Metadata): string[] => { .reduce((a, b) => a + b, 0); if (expected === 0 || expected !== metadata.size()) insert(`only string type is allowed`); - if (metadata.isRequired() === false) insert(`do not allow undefindable type`); if (metadata.nullable === true) insert(`do not allow nullable type`); else if (metadata.any === true) insert(`do not allow any type`); diff --git a/packages/core/tsconfig.test.json b/packages/core/tsconfig.test.json index 9ab4e16bd..9efe583a3 100644 --- a/packages/core/tsconfig.test.json +++ b/packages/core/tsconfig.test.json @@ -1,85 +1,7 @@ { + "extends": "./tsconfig.json", "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "lib": [ - "DOM", - "ES2015" - ], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "../../test/node_modules/@nestia/core/lib", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - "noUnusedLocals": true, /* Report errors on unused locals. */ - "noUnusedParameters": true, /* Report errors on unused parameters. */ - "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": [ - "node", - "reflect-metadata" - ], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - "stripInternal": true, - - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "plugins": [ - { - "transform": "typia/lib/transform", - "functional": true, - } - ], - "newLine": "LF", - }, - "include": ["src"] -} + "target": "ES2015", + "outDir": "../../test/node_modules/@nestia/core/lib" + } +} \ No newline at end of file diff --git a/packages/editor/package.json b/packages/editor/package.json index 0819fa22b..790ee7431 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/editor", - "version": "0.7.1", + "version": "0.8.0", "typings": "lib/index.d.ts", "main": "lib/index.js", "module": "lib/index.mjs", @@ -34,7 +34,7 @@ "homepage": "https://nestia.io", "dependencies": { "@mui/material": "^5.15.6", - "@nestia/migrate": "^0.19.0", + "@nestia/migrate": "^0.20.0", "@stackblitz/sdk": "^1.11.0", "js-yaml": "^4.1.0", "prettier": "^3.3.3", diff --git a/packages/fetcher/package.json b/packages/fetcher/package.json index 69ea96878..31eacf560 100644 --- a/packages/fetcher/package.json +++ b/packages/fetcher/package.json @@ -1,12 +1,12 @@ { "name": "@nestia/fetcher", - "version": "3.19.0-dev.20241111", + "version": "3.19.1", "description": "Fetcher library of Nestia SDK", "main": "lib/index.js", "typings": "lib/index.d.ts", "scripts": { "build": "rimraf lib && tsc", - "dev": "npm run build -- --watch", + "dev": "tsc -p tsconfig.test.json --watch", "eslint": "eslint src", "eslint:fix": "eslint src --fix" }, diff --git a/packages/fetcher/src/internal/FetcherBase.ts b/packages/fetcher/src/internal/FetcherBase.ts index b4118f2a4..9bf32622e 100644 --- a/packages/fetcher/src/internal/FetcherBase.ts +++ b/packages/fetcher/src/internal/FetcherBase.ts @@ -74,13 +74,15 @@ export namespace FetcherBase { const headers: Record = { ...(connection.headers ?? {}), }; - if (input !== undefined) + if (input !== undefined) { if (route.request?.type === undefined) throw new Error( `Error on ${props.className}.fetch(): no content-type being configured.`, ); else if (route.request.type !== "multipart/form-data") headers["Content-Type"] = route.request.type; + } else if (input === undefined && headers["Content-Type"] !== undefined) + delete headers["Content-Type"]; // INIT REQUEST DATA const init: RequestInit = { diff --git a/packages/fetcher/tsconfig.test.json b/packages/fetcher/tsconfig.test.json new file mode 100644 index 000000000..c216bd914 --- /dev/null +++ b/packages/fetcher/tsconfig.test.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "target": "ES2015", + "outDir": "../../test/node_modules/@nestia/fetcher/lib" + } +} \ No newline at end of file diff --git a/packages/migrate/assets/input/v3.1/body-optional.json b/packages/migrate/assets/input/v3.1/body-optional.json new file mode 100644 index 000000000..7eb852dc2 --- /dev/null +++ b/packages/migrate/assets/input/v3.1/body-optional.json @@ -0,0 +1,111 @@ +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.19.0-dev.20241111", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/body/optional/json": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBodyOptional" + } + } + }, + "required": false + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBodyOptional" + } + } + } + } + } + } + }, + "/body/optional/plain": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": false + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/health": { + "get": { + "tags": [], + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + } + } + } + }, + "components": { + "schemas": { + "IBodyOptional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "value": { + "type": "number" + } + }, + "required": [ + "id", + "value" + ] + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 8a356f56d..529dd03f8 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/migrate", - "version": "0.19.0", + "version": "0.20.0", "description": "Migration program from swagger to NestJS", "typings": "lib/index.d.ts", "main": "lib/index.js", @@ -38,9 +38,9 @@ "homepage": "https://nestia.io", "devDependencies": { "@nestia/benchmark": "^0.2.3", - "@nestia/core": "^3.18.0", + "@nestia/core": "^3.19.1", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.18.0", + "@nestia/fetcher": "^3.19.1", "@nestjs/common": "^10.3.8", "@nestjs/core": "^10.3.8", "@nestjs/platform-express": "^10.3.8", diff --git a/packages/migrate/src/programmers/MigrateApiFunctionProgrammer.ts b/packages/migrate/src/programmers/MigrateApiFunctionProgrammer.ts index 617b3fcec..a04e5587d 100644 --- a/packages/migrate/src/programmers/MigrateApiFunctionProgrammer.ts +++ b/packages/migrate/src/programmers/MigrateApiFunctionProgrammer.ts @@ -80,6 +80,11 @@ export namespace MigrateApiFunctionProgrammer { ts.factory.createTypeReferenceNode( `${route.accessor.at(-1)!}.Input`, ), + (route.body.type === "application/json" || + route.body.type === "text/plain") && + route.operation().requestBody?.required === false + ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) + : undefined, ), ] : []), diff --git a/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts b/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts index 81051b0bd..6bf77accc 100644 --- a/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts +++ b/packages/migrate/src/programmers/MigrateNestMethodProgrammer.ts @@ -199,6 +199,7 @@ export namespace MigrateNestMethodProgrammer { writeDtoParameter({ method: "TypedHeaders", variable: "headers" })( components, )(importer)({ + required: true, schema: route.headers.schema, example: route.headers.example(), examples: route.headers.examples(), @@ -210,6 +211,7 @@ export namespace MigrateNestMethodProgrammer { writeDtoParameter({ method: "TypedQuery", variable: "query" })( components, )(importer)({ + required: true, schema: route.query.schema, example: route.query.example(), examples: route.query.examples(), @@ -233,6 +235,11 @@ export namespace MigrateNestMethodProgrammer { variable: "body", })(components)(importer)({ schema: route.body.schema, + required: !( + (route.body.type === "application/json" || + route.body.type === "text/plain") && + route.operation().requestBody?.required === false + ), example: route.body.media().example, examples: route.body.media().examples, }), @@ -246,6 +253,7 @@ export namespace MigrateNestMethodProgrammer { (importer: MigrateImportProgrammer) => (props: { schema: OpenApi.IJsonSchema; + required: boolean; example?: any; examples?: Record; }): ts.ParameterDeclaration => { @@ -274,7 +282,9 @@ export namespace MigrateNestMethodProgrammer { ], undefined, accessor.variable, - undefined, + props.required === false + ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) + : undefined, MigrateSchemaProgrammer.write(components)(importer)(props.schema), ); }; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index c26cd442f..91f80db38 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@nestia/sdk", - "version": "3.19.0-dev.20241111", + "version": "3.19.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/core": "^3.19.0-dev.20241111", - "@nestia/fetcher": "^3.19.0-dev.20241111", + "@nestia/core": "^3.19.1", + "@nestia/fetcher": "^3.19.1", "@samchon/openapi": "^1.2.2", "cli": "^1.0.1", "get-function-location": "^2.0.0", @@ -47,8 +47,8 @@ "typia": "^6.12.0" }, "peerDependencies": { - "@nestia/core": ">=3.19.0-dev.20241111", - "@nestia/fetcher": ">=3.19.0-dev.20241111", + "@nestia/core": ">=3.19.1", + "@nestia/fetcher": ">=3.19.1", "@nestjs/common": ">=7.0.1", "@nestjs/core": ">=7.0.1", "reflect-metadata": ">=0.1.12", diff --git a/packages/sdk/src/generates/internal/SdkHttpFunctionProgrammer.ts b/packages/sdk/src/generates/internal/SdkHttpFunctionProgrammer.ts index 66924dd75..5996f3033 100644 --- a/packages/sdk/src/generates/internal/SdkHttpFunctionProgrammer.ts +++ b/packages/sdk/src/generates/internal/SdkHttpFunctionProgrammer.ts @@ -47,7 +47,7 @@ export namespace SdkHttpFunctionProgrammer { [], undefined, p.name, - p.metadata.optional + p.metadata.optional === true ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : undefined, project.config.primitive !== false && diff --git a/packages/sdk/src/transformers/SdkOperationProgrammer.ts b/packages/sdk/src/transformers/SdkOperationProgrammer.ts index f176d2156..996304ffa 100644 --- a/packages/sdk/src/transformers/SdkOperationProgrammer.ts +++ b/packages/sdk/src/transformers/SdkOperationProgrammer.ts @@ -48,7 +48,7 @@ export namespace SdkOperationProgrammer { ), jsDocTags: p.symbol?.getJsDocTags() ?? [], description: p.symbol - ? CommentFactory.description(p.symbol) ?? null + ? (CommentFactory.description(p.symbol) ?? null) : null, }; }; @@ -61,15 +61,20 @@ export namespace SdkOperationProgrammer { }): IOperationMetadata.IParameter => { const symbol: ts.Symbol | undefined = props.context.checker.getSymbolAtLocation(props.parameter); - const common: IOperationMetadata.IResponse = writeType({ + const common: IOperationMetadata.IResponse = writeResponse({ context: props.context, generics: props.generics, type: props.context.checker.getTypeFromTypeNode( props.parameter.type ?? TypeFactory.keyword("any"), ) ?? null, - required: props.parameter.questionToken === undefined, }); + const optional: boolean = props.parameter.questionToken !== undefined; + if (common.primitive.success) + common.primitive.data.metadata.optional = optional; + if (common.resolved.success) + common.resolved.data.metadata.optional = optional; + return { ...common, name: props.parameter.name.getText(), @@ -79,21 +84,10 @@ export namespace SdkOperationProgrammer { }; }; - const writeResponse = (props: { - context: ISdkOperationTransformerContext; - generics: WeakMap; - type: ts.Type | null; - }): IOperationMetadata.IResponse => - writeType({ - ...props, - required: true, - }); - - const writeType = (p: { + const writeResponse = (p: { context: ISdkOperationTransformerContext; generics: WeakMap; type: ts.Type | null; - required: boolean; }): IOperationMetadata.IResponse => { const analyzed: ImportAnalyzer.IOutput = p.type ? ImportAnalyzer.analyze(p.context.checker, p.generics, p.type) diff --git a/packages/sdk/tsconfig.test.json b/packages/sdk/tsconfig.test.json index d68b0efed..43e0faa0d 100644 --- a/packages/sdk/tsconfig.test.json +++ b/packages/sdk/tsconfig.test.json @@ -1,85 +1,7 @@ { + "extends": "./tsconfig.json", "compilerOptions": { - /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ - "lib": [ - "DOM", - "ES2015" - ], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "../../test/node_modules/@nestia/sdk/lib", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - "noUnusedLocals": true, /* Report errors on unused locals. */ - "noUnusedParameters": true, /* Report errors on unused parameters. */ - "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": [ - "node", - "reflect-metadata" - ], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - "stripInternal": true, - - /* Advanced Options */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "plugins": [ - { - "transform": "typia/lib/transform", - "functional": true, - } - ], - "newLine": "LF", - }, - "include": ["src"] -} + "target": "ES2015", + "outDir": "../../test/node_modules/@nestia/sdk/lib" + } +} \ No newline at end of file diff --git a/test/features/body-optional/nestia.config.ts b/test/features/body-optional/nestia.config.ts new file mode 100644 index 000000000..60c4be6d3 --- /dev/null +++ b/test/features/body-optional/nestia.config.ts @@ -0,0 +1,11 @@ +import { INestiaConfig } from "@nestia/sdk"; + +export const NESTIA_CONFIG: INestiaConfig = { + input: ["src/controllers"], + output: "src/api", + swagger: { + output: "swagger.json", + beautify: true, + }, +}; +export default NESTIA_CONFIG; diff --git a/test/features/body-optional/src/Backend.ts b/test/features/body-optional/src/Backend.ts new file mode 100644 index 000000000..fc5f679b2 --- /dev/null +++ b/test/features/body-optional/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/body-optional/src/api/HttpError.ts b/test/features/body-optional/src/api/HttpError.ts new file mode 100644 index 000000000..5df328ae4 --- /dev/null +++ b/test/features/body-optional/src/api/HttpError.ts @@ -0,0 +1 @@ +export { HttpError } from "@nestia/fetcher"; diff --git a/test/features/body-optional/src/api/IConnection.ts b/test/features/body-optional/src/api/IConnection.ts new file mode 100644 index 000000000..107bdb8f8 --- /dev/null +++ b/test/features/body-optional/src/api/IConnection.ts @@ -0,0 +1 @@ +export type { IConnection } from "@nestia/fetcher"; diff --git a/test/features/body-optional/src/api/Primitive.ts b/test/features/body-optional/src/api/Primitive.ts new file mode 100644 index 000000000..60d394424 --- /dev/null +++ b/test/features/body-optional/src/api/Primitive.ts @@ -0,0 +1 @@ +export type { Primitive } from "@nestia/fetcher"; diff --git a/test/features/body-optional/src/api/Resolved.ts b/test/features/body-optional/src/api/Resolved.ts new file mode 100644 index 000000000..a4f457e60 --- /dev/null +++ b/test/features/body-optional/src/api/Resolved.ts @@ -0,0 +1 @@ +export type { Resolved } from "@nestia/fetcher"; diff --git a/test/features/body-optional/src/api/functional/body/form/index.ts b/test/features/body-optional/src/api/functional/body/form/index.ts new file mode 100644 index 000000000..41cae2667 --- /dev/null +++ b/test/features/body-optional/src/api/functional/body/form/index.ts @@ -0,0 +1,56 @@ +/** + * @packageDocumentation + * @module api.functional.body.form + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Primitive, Resolved } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +import type { IBodyOptional } from "../../../structures/IBodyOptional"; + +/** + * @controller BodyController.formData + * @path POST /body/form + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function formData( + connection: IConnection, + body?: formData.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...formData.METADATA, + template: formData.METADATA.path, + path: formData.path(), + }, + body, + ); +} +export namespace formData { + export type Input = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/body/form", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: 201, + } as const; + + export const path = () => "/body/form"; +} diff --git a/test/features/body-optional/src/api/functional/body/index.ts b/test/features/body-optional/src/api/functional/body/index.ts new file mode 100644 index 000000000..0bb878fc0 --- /dev/null +++ b/test/features/body-optional/src/api/functional/body/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.body + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as optional from "./optional"; diff --git a/test/features/body-optional/src/api/functional/body/optional/index.ts b/test/features/body-optional/src/api/functional/body/optional/index.ts new file mode 100644 index 000000000..ad984f73a --- /dev/null +++ b/test/features/body-optional/src/api/functional/body/optional/index.ts @@ -0,0 +1,102 @@ +/** + * @packageDocumentation + * @module api.functional.body.optional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +import type { IConnection, Primitive, Resolved } from "@nestia/fetcher"; +import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher"; + +import type { IBodyOptional } from "../../../structures/IBodyOptional"; + +/** + * @controller BodyOptionalController.json + * @path POST /body/optional/json + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function json( + connection: IConnection, + body?: json.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...json.METADATA, + template: json.METADATA.path, + path: json.path(), + }, + body, + ); +} +export namespace json { + export type Input = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/body/optional/json", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: 201, + } as const; + + export const path = () => "/body/optional/json"; +} + +/** + * @controller BodyOptionalController.plain + * @path POST /body/optional/plain + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function plain( + connection: IConnection, + body?: plain.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "text/plain", + }, + }, + { + ...plain.METADATA, + template: plain.METADATA.path, + path: plain.path(), + }, + body, + ); +} +export namespace plain { + export type Input = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/body/optional/plain", + request: { + type: "text/plain", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: 201, + } as const; + + export const path = () => "/body/optional/plain"; +} diff --git a/test/features/body-optional/src/api/functional/health/index.ts b/test/features/body-optional/src/api/functional/health/index.ts new file mode 100644 index 000000000..36ae23908 --- /dev/null +++ b/test/features/body-optional/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: 200, + } as const; + + export const path = () => "/health"; +} diff --git a/test/features/body-optional/src/api/functional/index.ts b/test/features/body-optional/src/api/functional/index.ts new file mode 100644 index 000000000..badb79c9c --- /dev/null +++ b/test/features/body-optional/src/api/functional/index.ts @@ -0,0 +1,8 @@ +/** + * @packageDocumentation + * @module api.functional + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as body from "./body"; +export * as health from "./health"; diff --git a/test/features/body-optional/src/api/index.ts b/test/features/body-optional/src/api/index.ts new file mode 100644 index 000000000..1896c4fbd --- /dev/null +++ b/test/features/body-optional/src/api/index.ts @@ -0,0 +1,5 @@ +import * as api from "./module"; + +export * from "./module"; + +export default api; diff --git a/test/features/body-optional/src/api/module.ts b/test/features/body-optional/src/api/module.ts new file mode 100644 index 000000000..dbb6e9a51 --- /dev/null +++ b/test/features/body-optional/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-optional/src/api/structures/IBodyOptional.ts b/test/features/body-optional/src/api/structures/IBodyOptional.ts new file mode 100644 index 000000000..52b2a7faf --- /dev/null +++ b/test/features/body-optional/src/api/structures/IBodyOptional.ts @@ -0,0 +1,6 @@ +import { tags } from "typia"; + +export interface IBodyOptional { + id: string & tags.Format<"uuid">; + value: number; +} diff --git a/test/features/body-optional/src/controllers/BodyOptionalController.ts b/test/features/body-optional/src/controllers/BodyOptionalController.ts new file mode 100644 index 000000000..8a89a4dc1 --- /dev/null +++ b/test/features/body-optional/src/controllers/BodyOptionalController.ts @@ -0,0 +1,23 @@ +import { PlainBody, TypedBody, TypedRoute } from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import { v4 } from "uuid"; + +import { IBodyOptional } from "@api/lib/structures/IBodyOptional"; + +@Controller("body/optional") +export class BodyOptionalController { + @TypedRoute.Post("json") + public json(@TypedBody() body?: IBodyOptional | undefined): IBodyOptional { + return ( + body ?? { + id: v4(), + value: 1, + } + ); + } + + @TypedRoute.Post("plain") + public plain(@PlainBody() body?: string): string { + return body ?? "Hello, world!"; + } +} diff --git a/test/features/body-optional/src/controllers/HealthController.ts b/test/features/body-optional/src/controllers/HealthController.ts new file mode 100644 index 000000000..f7e06aef4 --- /dev/null +++ b/test/features/body-optional/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/body-optional/src/test/features/api/test_api_health_check.ts b/test/features/body-optional/src/test/features/api/test_api_health_check.ts new file mode 100644 index 000000000..4dceb4cec --- /dev/null +++ b/test/features/body-optional/src/test/features/api/test_api_health_check.ts @@ -0,0 +1,5 @@ +import api from "@api"; + +export const test_api_monitor_health_check = ( + connection: api.IConnection, +): Promise => api.functional.health.get(connection); diff --git a/test/features/body-optional/src/test/features/api/test_api_json_body_optional.ts b/test/features/body-optional/src/test/features/api/test_api_json_body_optional.ts new file mode 100644 index 000000000..e252713c1 --- /dev/null +++ b/test/features/body-optional/src/test/features/api/test_api_json_body_optional.ts @@ -0,0 +1,23 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IBodyOptional } from "@api/lib/structures/IBodyOptional"; + +export const test_api_json_body_optional = async ( + connection: api.IConnection, +): Promise => { + await api.functional.body.optional.json(connection); + await api.functional.body.optional.json( + connection, + typia.random(), + ); + + const response: Response = await fetch( + `${connection.host}/body/optional/json`, + { + method: "POST", + }, + ); + TestValidator.equals("status")(response.status)(201); +}; diff --git a/test/features/body-optional/src/test/features/api/test_api_plain_body_optional.ts b/test/features/body-optional/src/test/features/api/test_api_plain_body_optional.ts new file mode 100644 index 000000000..ebbde41eb --- /dev/null +++ b/test/features/body-optional/src/test/features/api/test_api_plain_body_optional.ts @@ -0,0 +1,22 @@ +import { TestValidator } from "@nestia/e2e"; + +import api from "@api"; + +export const test_api_plain_body_optional = async ( + connection: api.IConnection, +): Promise => { + TestValidator.equals("empty")( + await api.functional.body.optional.plain(connection), + )("Hello, world!"); + TestValidator.equals("filled")( + await api.functional.body.optional.plain(connection, "something"), + )("something"); + + const response: Response = await fetch( + `${connection.host}/body/optional/plain`, + { + method: "POST", + }, + ); + TestValidator.equals("status")(response.status)(201); +}; diff --git a/test/features/body-optional/src/test/index.ts b/test/features/body-optional/src/test/index.ts new file mode 100644 index 000000000..31a7190ab --- /dev/null +++ b/test/features/body-optional/src/test/index.ts @@ -0,0 +1,52 @@ +import { DynamicExecutor } from "@nestia/e2e"; +import chalk from "chalk"; + +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 trace = (str: string) => + console.log(` - ${chalk.green(exec.name)}: ${str}`); + if (exec.error === null) { + const elapsed: number = + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); + trace(`${chalk.yellow(elapsed.toLocaleString())} ms`); + } else trace(chalk.red(exec.error.name)); + }, + }); + 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/body-optional/swagger.json b/test/features/body-optional/swagger.json new file mode 100644 index 000000000..7eb852dc2 --- /dev/null +++ b/test/features/body-optional/swagger.json @@ -0,0 +1,111 @@ +{ + "openapi": "3.1.0", + "servers": [ + { + "url": "https://github.com/samchon/nestia", + "description": "insert your server url" + } + ], + "info": { + "version": "3.19.0-dev.20241111", + "title": "@samchon/nestia-test", + "description": "Test program of Nestia", + "license": { + "name": "MIT" + } + }, + "paths": { + "/body/optional/json": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBodyOptional" + } + } + }, + "required": false + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IBodyOptional" + } + } + } + } + } + } + }, + "/body/optional/plain": { + "post": { + "tags": [], + "parameters": [], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": false + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/health": { + "get": { + "tags": [], + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": {} + } + } + } + } + } + }, + "components": { + "schemas": { + "IBodyOptional": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "value": { + "type": "number" + } + }, + "required": [ + "id", + "value" + ] + } + } + }, + "tags": [], + "x-samchon-emended": true +} \ No newline at end of file diff --git a/test/features/body-optional/tsconfig.json b/test/features/body-optional/tsconfig.json new file mode 100644 index 000000000..afe2540b1 --- /dev/null +++ b/test/features/body-optional/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/fastify/nestia.config.ts b/test/features/fastify/nestia.config.ts index e4547d955..ca670ea91 100644 --- a/test/features/fastify/nestia.config.ts +++ b/test/features/fastify/nestia.config.ts @@ -3,7 +3,6 @@ import { INestiaConfig } from "@nestia/sdk"; export const NESTIA_CONFIG: INestiaConfig = { input: ["src/controllers"], output: "src/api", - e2e: "src/test", swagger: { output: "swagger.json", security: { diff --git a/test/features/fastify/src/api/functional/body/index.ts b/test/features/fastify/src/api/functional/body/index.ts new file mode 100644 index 000000000..0bb878fc0 --- /dev/null +++ b/test/features/fastify/src/api/functional/body/index.ts @@ -0,0 +1,7 @@ +/** + * @packageDocumentation + * @module api.functional.body + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +//================================================================ +export * as optional from "./optional"; diff --git a/test/features/fastify/src/api/functional/body/optional/index.ts b/test/features/fastify/src/api/functional/body/optional/index.ts new file mode 100644 index 000000000..ea84f028e --- /dev/null +++ b/test/features/fastify/src/api/functional/body/optional/index.ts @@ -0,0 +1,102 @@ +/** + * @packageDocumentation + * @module api.functional.body.optional + * @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 { IBodyOptional } from "../../../structures/IBodyOptional"; + +/** + * @controller BodyOptionalController.json + * @path POST /body/optional/json + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function json( + connection: IConnection, + body?: json.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "application/json", + }, + }, + { + ...json.METADATA, + template: json.METADATA.path, + path: json.path(), + }, + body, + ); +} +export namespace json { + export type Input = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/body/optional/json", + request: { + type: "application/json", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: 201, + } as const; + + export const path = () => "/body/optional/json"; +} + +/** + * @controller BodyOptionalController.plain + * @path POST /body/optional/plain + * @nestia Generated by Nestia - https://github.com/samchon/nestia + */ +export async function plain( + connection: IConnection, + body?: plain.Input, +): Promise { + return PlainFetcher.fetch( + { + ...connection, + headers: { + ...connection.headers, + "Content-Type": "text/plain", + }, + }, + { + ...plain.METADATA, + template: plain.METADATA.path, + path: plain.path(), + }, + body, + ); +} +export namespace plain { + export type Input = Resolved; + export type Output = Primitive; + + export const METADATA = { + method: "POST", + path: "/body/optional/plain", + request: { + type: "text/plain", + encrypted: false, + }, + response: { + type: "application/json", + encrypted: false, + }, + status: 201, + } as const; + + export const path = () => "/body/optional/plain"; +} diff --git a/test/features/fastify/src/api/functional/index.ts b/test/features/fastify/src/api/functional/index.ts index d98ec24b4..b72a9c187 100644 --- a/test/features/fastify/src/api/functional/index.ts +++ b/test/features/fastify/src/api/functional/index.ts @@ -5,6 +5,7 @@ */ //================================================================ export * as bbs from "./bbs"; +export * as body from "./body"; export * as calculate from "./calculate"; export * as health from "./health"; export * as performance from "./performance"; diff --git a/test/features/fastify/src/api/structures/IBodyOptional.ts b/test/features/fastify/src/api/structures/IBodyOptional.ts new file mode 100644 index 000000000..52b2a7faf --- /dev/null +++ b/test/features/fastify/src/api/structures/IBodyOptional.ts @@ -0,0 +1,6 @@ +import { tags } from "typia"; + +export interface IBodyOptional { + id: string & tags.Format<"uuid">; + value: number; +} diff --git a/test/features/fastify/src/controllers/BodyOptionalController.ts b/test/features/fastify/src/controllers/BodyOptionalController.ts new file mode 100644 index 000000000..8a89a4dc1 --- /dev/null +++ b/test/features/fastify/src/controllers/BodyOptionalController.ts @@ -0,0 +1,23 @@ +import { PlainBody, TypedBody, TypedRoute } from "@nestia/core"; +import { Controller } from "@nestjs/common"; +import { v4 } from "uuid"; + +import { IBodyOptional } from "@api/lib/structures/IBodyOptional"; + +@Controller("body/optional") +export class BodyOptionalController { + @TypedRoute.Post("json") + public json(@TypedBody() body?: IBodyOptional | undefined): IBodyOptional { + return ( + body ?? { + id: v4(), + value: 1, + } + ); + } + + @TypedRoute.Post("plain") + public plain(@PlainBody() body?: string): string { + return body ?? "Hello, world!"; + } +} diff --git a/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_index.ts b/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_index.ts deleted file mode 100644 index 04a597311..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; -import type { IBbsArticle } from "../../../../api/structures/IBbsArticle"; -import type { IPage } from "../../../../api/structures/IPage"; - -export const test_api_bbs_articles_index = async ( - connection: api.IConnection, -) => { - const output: Primitive> = - await api.functional.bbs.articles.index( - connection, - typia.random(), - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_store.ts b/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_store.ts deleted file mode 100644 index 4508b92e1..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_store.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; -import type { IBbsArticle } from "../../../../api/structures/IBbsArticle"; - -export const test_api_bbs_articles_store = async ( - connection: api.IConnection, -) => { - const output: Primitive = - await api.functional.bbs.articles.store( - connection, - typia.random(), - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_update.ts b/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_update.ts deleted file mode 100644 index 80c5bfc49..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_bbs_articles_update.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; -import type { Format } from "typia/lib/tags/Format"; - -import api from "../../../../api"; -import type { IBbsArticle } from "../../../../api/structures/IBbsArticle"; - -export const test_api_bbs_articles_update = async ( - connection: api.IConnection, -) => { - const output: Primitive = - await api.functional.bbs.articles.update( - connection, - typia.random(), - typia.random>(), - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_health_get.ts b/test/features/fastify/src/test/features/api/automated/test_api_health_get.ts deleted file mode 100644 index 8766b1129..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_health_get.ts +++ /dev/null @@ -1,8 +0,0 @@ -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_health_get = async (connection: api.IConnection) => { - const output = await api.functional.health.get(connection); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_param_boolean.ts b/test/features/fastify/src/test/features/api/automated/test_api_param_boolean.ts deleted file mode 100644 index b563a520e..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_param_boolean.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_param_boolean = async (connection: api.IConnection) => { - const output: Primitive = await api.functional.param.boolean( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_param_literal.ts b/test/features/fastify/src/test/features/api/automated/test_api_param_literal.ts deleted file mode 100644 index b4dc5f510..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_param_literal.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_param_literal = async (connection: api.IConnection) => { - const output: Primitive<"A" | "B" | "C"> = await api.functional.param.literal( - connection, - typia.random<"A" | "B" | "C">(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_param_nullable.ts b/test/features/fastify/src/test/features/api/automated/test_api_param_nullable.ts deleted file mode 100644 index 6974bf7a0..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_param_nullable.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_param_nullable = async (connection: api.IConnection) => { - const output: Primitive = await api.functional.param.nullable( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_param_number.ts b/test/features/fastify/src/test/features/api/automated/test_api_param_number.ts deleted file mode 100644 index 10eeb5f42..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_param_number.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_param_number = async (connection: api.IConnection) => { - const output: Primitive = await api.functional.param.number( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_param_string.ts b/test/features/fastify/src/test/features/api/automated/test_api_param_string.ts deleted file mode 100644 index 7781d46bb..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_param_string.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_param_string = async (connection: api.IConnection) => { - const output: Primitive = await api.functional.param.string( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_performance_get.ts b/test/features/fastify/src/test/features/api/automated/test_api_performance_get.ts deleted file mode 100644 index 54cdfd218..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_performance_get.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; -import type { IPerformance } from "../../../../api/structures/IPerformance"; - -export const test_api_performance_get = async (connection: api.IConnection) => { - const output: Primitive = - await api.functional.performance.get(connection); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_plain_send.ts b/test/features/fastify/src/test/features/api/automated/test_api_plain_send.ts deleted file mode 100644 index 704bf9b15..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_plain_send.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Resolved } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_plain_send = async (connection: api.IConnection) => { - const output: Resolved = await api.functional.plain.send( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_exit.ts b/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_exit.ts deleted file mode 100644 index 9bcdb8167..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_exit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import typia from "typia"; - -import api from "../../../../api"; - -export const test_api_sellers_authenticate_exit = async ( - connection: api.IConnection, -) => { - const output = await api.functional.sellers.authenticate.exit(connection); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_join.ts b/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_join.ts deleted file mode 100644 index 6102321aa..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_join.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; -import type { ISeller } from "../../../../api/structures/ISeller"; - -export const test_api_sellers_authenticate_join = async ( - connection: api.IConnection, -) => { - const output: Primitive = - await api.functional.sellers.authenticate.join( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_login.ts b/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_login.ts deleted file mode 100644 index 2dadf51ab..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_login.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Primitive } from "@nestia/fetcher"; -import typia from "typia"; - -import api from "../../../../api"; -import type { ISeller } from "../../../../api/structures/ISeller"; - -export const test_api_sellers_authenticate_login = async ( - connection: api.IConnection, -) => { - const output: Primitive = - await api.functional.sellers.authenticate.login( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_password_change.ts b/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_password_change.ts deleted file mode 100644 index 16562af50..000000000 --- a/test/features/fastify/src/test/features/api/automated/test_api_sellers_authenticate_password_change.ts +++ /dev/null @@ -1,14 +0,0 @@ -import typia from "typia"; - -import api from "../../../../api"; -import type { ISeller } from "../../../../api/structures/ISeller"; - -export const test_api_sellers_authenticate_password_change = async ( - connection: api.IConnection, -) => { - const output = await api.functional.sellers.authenticate.password.change( - connection, - typia.random(), - ); - typia.assert(output); -}; diff --git a/test/features/fastify/src/test/features/api/test_api_json_body_optional.ts b/test/features/fastify/src/test/features/api/test_api_json_body_optional.ts new file mode 100644 index 000000000..e252713c1 --- /dev/null +++ b/test/features/fastify/src/test/features/api/test_api_json_body_optional.ts @@ -0,0 +1,23 @@ +import { TestValidator } from "@nestia/e2e"; +import typia from "typia"; + +import api from "@api"; +import { IBodyOptional } from "@api/lib/structures/IBodyOptional"; + +export const test_api_json_body_optional = async ( + connection: api.IConnection, +): Promise => { + await api.functional.body.optional.json(connection); + await api.functional.body.optional.json( + connection, + typia.random(), + ); + + const response: Response = await fetch( + `${connection.host}/body/optional/json`, + { + method: "POST", + }, + ); + TestValidator.equals("status")(response.status)(201); +}; diff --git a/test/features/fastify/src/test/features/api/test_api_plain_body_optional.ts b/test/features/fastify/src/test/features/api/test_api_plain_body_optional.ts new file mode 100644 index 000000000..ebbde41eb --- /dev/null +++ b/test/features/fastify/src/test/features/api/test_api_plain_body_optional.ts @@ -0,0 +1,22 @@ +import { TestValidator } from "@nestia/e2e"; + +import api from "@api"; + +export const test_api_plain_body_optional = async ( + connection: api.IConnection, +): Promise => { + TestValidator.equals("empty")( + await api.functional.body.optional.plain(connection), + )("Hello, world!"); + TestValidator.equals("filled")( + await api.functional.body.optional.plain(connection, "something"), + )("something"); + + const response: Response = await fetch( + `${connection.host}/body/optional/plain`, + { + method: "POST", + }, + ); + TestValidator.equals("status")(response.status)(201); +}; diff --git a/test/features/fastify/swagger.json b/test/features/fastify/swagger.json index 4d037fdc1..4bcf9b25b 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.17.0","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":{"summary":"Store a new article","description":"Store a new article.","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"}}}}}}},"/bbs/articles/{section}/{id}":{"put":{"summary":"Update an article","description":"Update an article.","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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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":{"summary":"Join as a seller","description":"Join as a seller.","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.Post](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}}}},"/sellers/authenticate/login":{"post":{"summary":"Log-in as a seller","description":"Log-in as a seller.","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.Post](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}}}},"/sellers/authenticate/password/change":{"patch":{"summary":"Change password","description":"Change password.","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","content":{"application/json":{}}}}}},"/sellers/authenticate/exit":{"delete":{"summary":"Erase the seller by itself","description":"Erase the seller by itself.","tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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":{"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."},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"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.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.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.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"}}},"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.19.0-dev.20241111","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":{"summary":"Store a new article","description":"Store a new article.","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"}}}}}}},"/bbs/articles/{section}/{id}":{"put":{"summary":"Update an article","description":"Update an article.","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"}}}}}}},"/body/optional/json":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBodyOptional"}}},"required":false},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IBodyOptional"}}}}}}},"/body/optional/plain":{"post":{"tags":[],"parameters":[],"requestBody":{"content":{"text/plain":{"schema":{"type":"string"}}},"required":false},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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":{"summary":"Join as a seller","description":"Join as a seller.","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.Post](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}}}},"/sellers/authenticate/login":{"post":{"summary":"Log-in as a seller","description":"Log-in as a seller.","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.Post](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}}}},"/sellers/authenticate/password/change":{"patch":{"summary":"Change password","description":"Change password.","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","content":{"application/json":{}}}}}},"/sellers/authenticate/exit":{"delete":{"summary":"Erase the seller by itself","description":"Erase the seller by itself.","tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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":{"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."},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"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"]},"IBodyOptional":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"value":{"type":"number"}},"required":["id","value"]},"IPerformance":{"type":"object","properties":{"cpu":{"$ref":"#/components/schemas/process.global.NodeJS.CpuUsage"},"memory":{"$ref":"#/components/schemas/process.global.NodeJS.MemoryUsage"},"resource":{"$ref":"#/components/schemas/process.global.NodeJS.ResourceUsage"}},"required":["cpu","memory","resource"],"description":"Performance info."},"process.global.NodeJS.CpuUsage":{"type":"object","properties":{"user":{"type":"number"},"system":{"type":"number"}},"required":["user","system"]},"process.global.NodeJS.MemoryUsage":{"type":"object","properties":{"rss":{"type":"number"},"heapTotal":{"type":"number"},"heapUsed":{"type":"number"},"external":{"type":"number"},"arrayBuffers":{"type":"number"}},"required":["rss","heapTotal","heapUsed","external","arrayBuffers"]},"process.global.NodeJS.ResourceUsage":{"type":"object","properties":{"fsRead":{"type":"number"},"fsWrite":{"type":"number"},"involuntaryContextSwitches":{"type":"number"},"ipcReceived":{"type":"number"},"ipcSent":{"type":"number"},"majorPageFault":{"type":"number"},"maxRSS":{"type":"number"},"minorPageFault":{"type":"number"},"sharedMemorySize":{"type":"number"},"signalsCount":{"type":"number"},"swappedOut":{"type":"number"},"systemCPUTime":{"type":"number"},"unsharedDataSize":{"type":"number"},"unsharedStackSize":{"type":"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.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.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.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"}}},"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 9e0ad613b..c65792878 100644 --- a/test/features/query-decompose-false/swagger.json +++ b/test/features/query-decompose-false/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.17.0", + "version": "3.19.0-dev.20241112", "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 5475f209b..f1976db17 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.17.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":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"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":{"values":{"type":"array","items":{"type":"string"}},"limit":{"type":"number"},"enforce":{"type":"boolean"}},"required":["values","enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"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.19.0-dev.20241112","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":"values","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":true},{"name":"limit","in":"query","schema":{"type":"number"},"required":false},{"name":"enforce","in":"query","schema":{"type":"boolean"},"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":{"values":{"type":"array","items":{"type":"string"}},"limit":{"type":"number"},"enforce":{"type":"boolean"}},"required":["values","enforce"],"description":"Construct a type with the properties of T except for those in type K."}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"tags":[],"x-samchon-emended":true} \ 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 447c6abf7..a6b8694b4 100644 --- a/test/features/query/src/api/functional/query/index.ts +++ b/test/features/query/src/api/functional/query/index.ts @@ -10,7 +10,6 @@ import typia from "typia"; import type { IBigQuery } from "../../structures/IBigQuery"; import type { INestQuery } from "../../structures/INestQuery"; -import type { IOptionalQuery } from "../../structures/IOptionalQuery"; import type { IQuery } from "../../structures/IQuery"; /** @@ -57,50 +56,6 @@ 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: 200, - } as const; - - export const path = (query: optional.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/optional"; - return 0 === variables.size - ? location - : `${location}?${variables.toString()}`; - }; -} - /** * @controller QueryController.nest * @path GET /query/nest diff --git a/test/features/query/src/controllers/QueryController.ts b/test/features/query/src/controllers/QueryController.ts index d5ab04ca2..6b0115839 100644 --- a/test/features/query/src/controllers/QueryController.ts +++ b/test/features/query/src/controllers/QueryController.ts @@ -3,7 +3,6 @@ import { Controller, Query } from "@nestjs/common"; import { IBigQuery } from "@api/lib/structures/IBigQuery"; import { INestQuery } from "@api/lib/structures/INestQuery"; -import { IOptionalQuery } from "@api/lib/structures/IOptionalQuery"; import { IQuery } from "@api/lib/structures/IQuery"; @Controller("query") @@ -13,13 +12,6 @@ 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 deleted file mode 100644 index 559d2dca6..000000000 --- a/test/features/query/src/test/features/api/test_api_query_optional.ts +++ /dev/null @@ -1,16 +0,0 @@ -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 8760cb725..774ec161c 100644 --- a/test/features/query/swagger.json +++ b/test/features/query/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.17.0", + "version": "3.19.0-dev.20241112", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { @@ -76,49 +76,6 @@ } } }, - "/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": [], @@ -352,20 +309,6 @@ "atomic" ] }, - "IOptionalQuery": { - "type": "object", - "properties": { - "a": { - "type": "string" - }, - "b": { - "type": "number" - }, - "c": { - "type": "boolean" - } - } - }, "INestQuery": { "type": "object", "properties": { diff --git a/test/features/route-manual-assert/swagger.json b/test/features/route-manual-assert/swagger.json index 287ecc7bf..458267cb0 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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 287ecc7bf..458267cb0 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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 287ecc7bf..458267cb0 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-validate-log-encrypted/swagger.json b/test/features/route-manual-validate-log-encrypted/swagger.json index 92f07b98c..378de135c 100644 --- a/test/features/route-manual-validate-log-encrypted/swagger.json +++ b/test/features/route-manual-validate-log-encrypted/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"thumbnail":{"oneOf":[{"type":"null"},{"type":"string","format":"uri","contentMediaType":"image/*"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","thumbnail","created_at"]}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"thumbnail":{"oneOf":[{"type":"null"},{"type":"string","format":"uri","contentMediaType":"image/*"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","thumbnail","created_at"]}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-validate-log-fastify/swagger.json b/test/features/route-manual-validate-log-fastify/swagger.json index 92f07b98c..378de135c 100644 --- a/test/features/route-manual-validate-log-fastify/swagger.json +++ b/test/features/route-manual-validate-log-fastify/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"thumbnail":{"oneOf":[{"type":"null"},{"type":"string","format":"uri","contentMediaType":"image/*"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","thumbnail","created_at"]}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"thumbnail":{"oneOf":[{"type":"null"},{"type":"string","format":"uri","contentMediaType":"image/*"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","thumbnail","created_at"]}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"tags":[],"x-samchon-emended":true} \ No newline at end of file diff --git a/test/features/route-manual-validate-log/swagger.json b/test/features/route-manual-validate-log/swagger.json index 92f07b98c..378de135c 100644 --- a/test/features/route-manual-validate-log/swagger.json +++ b/test/features/route-manual-validate-log/swagger.json @@ -1 +1 @@ -{"openapi":"3.1.0","servers":[{"url":"https://github.com/samchon/nestia","description":"insert your server url"}],"info":{"version":"3.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"thumbnail":{"oneOf":[{"type":"null"},{"type":"string","format":"uri","contentMediaType":"image/*"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","thumbnail","created_at"]}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"IBbsArticle":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":"string"},"thumbnail":{"oneOf":[{"type":"null"},{"type":"string","format":"uri","contentMediaType":"image/*"}]},"created_at":{"type":"string","format":"date-time"}},"required":["id","title","body","thumbnail","created_at"]}},"securitySchemes":{"bearer":{"type":"apiKey"}}},"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 287ecc7bf..458267cb0 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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 287ecc7bf..458267cb0 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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 86619ba3c..f1a21a7c9 100644 --- a/test/features/security/swagger.json +++ b/test/features/security/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.17.0", + "version": "3.19.0-dev.20241112", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { diff --git a/test/features/simulate/swagger.json b/test/features/simulate/swagger.json index 1ccca0436..9cea20e8d 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"summary":"Paginate entire articles","description":"Paginate entire articles.","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"}}}}}},"get":{"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.).","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"}}}}}},"post":{"summary":"Store a new article","description":"Store a new article.","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"}}}}}}},"/bbs/{section}/articles/{id}":{"get":{"summary":"Read an article","description":"Read an article.","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"}}}}}},"put":{"summary":"Update an article","description":"Update an article.","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"}}}}}}},"/bbs/{section}/articles/first/{date}":{"get":{"summary":"Get first article of a day","description":"Get first article of a day.","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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"summary":"Join as a seller","description":"Join as a seller.","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.Post](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}}}},"/sellers/authenticate/login":{"post":{"summary":"Log-in as a seller","description":"Log-in as a seller.","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.Post](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}}}},"/sellers/authenticate/password/change":{"patch":{"summary":"Change password","description":"Change password.","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","content":{"application/json":{}}}}}},"/sellers/authenticate/exit":{"delete":{"summary":"Erase the seller by itself","description":"Erase the seller by itself.","tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"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."},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"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.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.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.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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/bbs/{section}/articles":{"patch":{"summary":"Paginate entire articles","description":"Paginate entire articles.","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"}}}}}},"get":{"summary":"Paginate entire articles (query ver.)","description":"Paginate entire articles (query ver.).","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"}}}}}},"post":{"summary":"Store a new article","description":"Store a new article.","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"}}}}}}},"/bbs/{section}/articles/{id}":{"get":{"summary":"Read an article","description":"Read an article.","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"}}}}}},"put":{"summary":"Update an article","description":"Update an article.","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"}}}}}}},"/bbs/{section}/articles/first/{date}":{"get":{"summary":"Get first article of a day","description":"Get first article of a day.","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"}}}}}}},"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/performance":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IPerformance"}}}}}}},"/sellers/authenticate/join":{"post":{"summary":"Join as a seller","description":"Join as a seller.","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.Post](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}}}},"/sellers/authenticate/login":{"post":{"summary":"Log-in as a seller","description":"Log-in as a seller.","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.Post](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}}}},"/sellers/authenticate/password/change":{"patch":{"summary":"Change password","description":"Change password.","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","content":{"application/json":{}}}}}},"/sellers/authenticate/exit":{"delete":{"summary":"Erase the seller by itself","description":"Erase the seller by itself.","tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}}},"components":{"schemas":{"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."},"IPage.IRequest":{"type":"object","properties":{"page":{"oneOf":[{"type":"null"},{"type":"integer"}]},"limit":{"oneOf":[{"type":"null"},{"type":"integer"}]}},"description":"Page request data"},"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.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.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.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"}}},"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 9c892dfe0..5ab50296e 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.17.0","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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.19.0-dev.20241112","title":"@samchon/nestia-test","description":"Test program of Nestia","license":{"name":"MIT"}},"paths":{"/health":{"get":{"tags":[],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{}}}}}},"/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"}}},"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 91f6a7ccf..8657db825 100644 --- a/test/features/swagger-customizer/swagger.json +++ b/test/features/swagger-customizer/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.17.0", + "version": "3.19.0-dev.20241112", "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 102d147dd..d3c8e4576 100644 --- a/test/features/swagger-example/swagger.json +++ b/test/features/swagger-example/swagger.json @@ -7,7 +7,7 @@ } ], "info": { - "version": "3.17.0", + "version": "3.19.0-dev.20241112", "title": "@samchon/nestia-test", "description": "Test program of Nestia", "license": { @@ -29,87 +29,77 @@ "$ref": "#/components/schemas/IBbsArticle.ICreate" }, "example": { - "title": "kujwswxungakkeg", - "body": "imzvohzi", + "title": "bndqeeiossrdxw", + "body": "yjldfltte", "files": [ { - "name": null, - "extension": "fahhemtj", - "url": "https://hofrnmmmfm.eat" + "name": "klzcoxtoxltylgdxtfvppyzgkdwbtigeeencumdvvebzuzcrixcrktgbqwgkaseyvjgqsdmdavhftrzllciehmpskgyrlznqbuinzhyljypwqgpafjqjucymlfomgzsirldnlqiboezxoyibhofojpimsobbeqbxuzzwomdoxlbwjhgusltfqw", + "extension": "fhqdp", + "url": "https://krbifnixbj.lzm" }, { - "name": null, - "extension": "nsz", - "url": "https://knixzkymvl.eyk" - }, - { - "name": null, - "extension": "ubrgryvo", - "url": "https://wwwpbifejn.fye" + "name": "wvvdhakgwcapmbp", + "extension": null, + "url": "https://jeglbhugej.xij" } ] }, "examples": { "z": { - "title": "wrxcuskxnhfvlulioztmkaijo", - "body": "khdddcfart", + "title": "rff", + "body": "laqfk", "files": [ { - "name": "gutqcqjvzfckuxymjmkinflgrqgmyuakrmzxwcjapromrrzadaztbpikynxbyleszarhrgojo", - "extension": "z", - "url": "https://nokfguqoxc.wzh" + "name": null, + "extension": "mqomvk", + "url": "https://bkjqiuyajm.vam" }, { "name": null, - "extension": null, - "url": "https://cqmkjywmmi.ioa" + "extension": "kchtuhh", + "url": "https://ewsnstpznq.xlx" }, { - "name": "sqhzjqqqqckgir", - "extension": "gyqi", - "url": "https://srcpnokmgw.unw" + "name": "jtddlifgpxdvhcnetqadumaarbjoxgcwcjpxrqvhmpplxwunckqrgwlpgotayhwzqgectnopiuowwlondkqlrpmseqglofnqzyerlouuxhiikpchyieajiceyqnqeuiopxvluugvzgzkdfiumnhdrmuxyxggrgsyylmxvhxalbjqbxhpsovkztrkwyrjpmgqheivjqbozjbnadqqetslmjdtwgcrvr", + "extension": null, + "url": "https://bizyjdehzz.dsk" } ] }, "y": { - "title": "jlqajlnmtrapubwsrsuknkvclapvlaruylhzp", - "body": "puuxxisvg", + "title": "wxiiwhqbnhyulncknmyvu", + "body": "wtwieosm", "files": [ { - "name": null, + "name": "icbbijcumybogpgosvwqougywvaxjngwohvtctdglxeuacvlpeilkjrfzhprcxbcgufajnaouxauzeelwlkntptkoqvxojtoshpoiowgygtbfvoffbhvietbfybneyctuyyvuywgcrodqmioofndqphkheioqrlpazakjrjlisyohxconuyrytsbpbvnpqxqarsatephjcapytfp", "extension": null, - "url": "https://lohkemjmfa.rom" + "url": "https://ljuoymxufl.yvt" }, { - "name": "pzsnirmycjeraaeftyclglkwqmrmabzxubnrosqubsawonhacrmglgxgysjkhyvjufjpkaqkrdnmdmthpdohfewvzpybqlqodhnhdkhnuckgbwabvvhjex", - "extension": null, - "url": "https://qzbzjexytp.uaz" - }, - { - "name": "xaxrvoiqwtbrdmmugqlhykzovxkxybormjfcruntqceqqedipipcharzuklcxgdrprneamhlgvqjzbviuzhujivwusdx", - "extension": null, - "url": "https://ziditnkywr.jqr" + "name": "qrgcheteazeseidgwbeovcqyrrnqwpjroedryqxismlpwta", + "extension": "lfuzcdi", + "url": "https://cvldpqychk.cwn" } ] }, "x": { - "title": "vkofrsbemgbmziaxuglvuewioztaylalfaz", - "body": "syzjzjz", + "title": "ecullrsbtiaqevvestnydkvnyvzvlkd", + "body": "rbissryv", "files": [ { - "name": null, - "extension": "oahfq", - "url": "https://nsesyxzqfy.zba" + "name": "dibtsxvlulfxoyhvkwjlorcnhqehbyokbmhescgskdnlkuq", + "extension": "pcps", + "url": "https://kbebsdwfoo.enc" }, { - "name": "tzjteuomrssihyqqrxfgkpfvjhsbsrpldgpbjtlmtlatrhutohjphfqxrmwkubwdhszyxmwnqofiercpbeeyxvjsotyxwmuq", - "extension": "dzx", - "url": "https://mvlsddjlnx.oky" + "name": null, + "extension": null, + "url": "https://ujeykzbiqz.oho" }, { - "name": "zvlrstgachkvwumuqruzclwengfimsylmewomeygpkmzauompsjsxnrrfefdevfthnoaytqacaidvdiaektllhvnqbesbkfikatrbxsyrcgzhcjgpjchgbjjmsvgqsckootoeenhldphwcsizbhahqzcrkxpbatqojroamiodjhwfberxanzywnyfgavzlqyzljulginbuylufwiccxlhcudtxcayzhxjekeceurxqtpevlhbbyc", + "name": "jubthvtpyptawyflicrdxtxzxcmccynmtdskkkoyuxiomfhaunxfsadrurscwfdivlietyigzlqxaohqwrxhwz", "extension": null, - "url": "https://cqgsguexjq.ppu" + "url": "https://spavlyzvpn.wfs" } ] } @@ -127,20 +117,25 @@ "$ref": "#/components/schemas/IBbsArticle" }, "example": { - "id": "4c3181f9-9d3b-4206-ad4a-f4e5f8bdec9a", - "created_at": "2024-10-15T20:42:23.114Z", - "title": "tdtmcntreqrk", - "body": "esbzrsa", + "id": "7b700e9e-6694-42cf-aaed-73133b6335ef", + "created_at": "2024-11-08T17:33:54.161Z", + "title": "jwrerhvkcecsb", + "body": "djupcde", "files": [ { - "name": "emhpkilthoykpclnnjirhxcpaceenopwxcznbajdsxllztacstdgckpuhwnzu", - "extension": "vlnu", - "url": "https://rkezkoyqys.nyv" + "name": null, + "extension": "effvzog", + "url": "https://iwmzeercwx.xrx" + }, + { + "name": null, + "extension": null, + "url": "https://pzodqgdtem.xth" }, { - "name": "yrjttutgcdvexr", - "extension": "metqemp", - "url": "https://kowoeignub.jcs" + "name": "xqkzvxeapjcak", + "extension": "gzbtgcah", + "url": "https://znxbbtvbtm.ubx" } ] } @@ -162,7 +157,7 @@ "format": "uuid" }, "required": true, - "example": "b26491a8-7988-44d7-8a3c-73a842388318" + "example": "b9df6cae-ca9d-45d6-8e29-095e384b720d" } ], "requestBody": { @@ -172,7 +167,24 @@ "$ref": "#/components/schemas/PartialIBbsArticle.ICreate" }, "example": { - "title": "exhehwybpxngielgieyqgsozugwebayrxywtqxxosuyjvxw" + "title": "utknbdyhobjigbocnkmuinwcvhmamppsvaphkeuh", + "files": [ + { + "name": "igxqdvfcctjaxjkzdllyxdkcmhsaxpddvhvvierszpcxjisfggpaohfnpsruzkkxxacmrahbwxiugfynyvyeflbm", + "extension": null, + "url": "https://bbgsbzzwqp.ahd" + }, + { + "name": "izrqwoxrrhvrlorkjjltcwaqkfdqccbwenvjupyoehithuxdamrnjtybhyjerzecdfckhicaubbeyhrfuhtrjygyqraueutbdwbpwnduqrinkronwocykplohhntpzygmwijddbcasklqejzrphtzbvhkukswzheedhtiliozsbmueeiedqtuknqtsegwgxaumbvjftovbxiipcufkdhdsrxifhmsmuywfgcbjrwmvtncxbeuotgbthone", + "extension": "ga", + "url": "https://muxcgkgizd.ppk" + }, + { + "name": "xkwzhawpurhvyxccszqrhzqnzdbqydirjhlpaangmonufdenhxtnxpjdrxvdxrziyvbahxnwwrndqkyxrzbqqupanffvjuikmjdpsakwwbphszwztfokrkdjrnddgjlwyqrodakwsplsqkiphpkjliprkoqhqwfsturaapeknjokdzpsmzzn", + "extension": null, + "url": "https://nqfuvunwjc.ewe" + } + ] } } }, @@ -187,54 +199,32 @@ "$ref": "#/components/schemas/IBbsArticle" }, "example": { - "id": "26d5fd4b-c50f-414c-aec7-04f23bcbcc2d", - "created_at": "2024-10-07T02:19:40.717Z", - "title": "ldjgazuuzqskanqj", - "body": "sofqtk", - "files": [ - { - "name": null, - "extension": null, - "url": "https://jokipcbkuo.vfb" - } - ] + "id": "34b6d2e2-5303-49c9-b3b2-faf5919e98a6", + "created_at": "2024-11-03T03:50:58.970Z", + "title": "oilwiipsudgocxbowxwlp", + "body": "ubdzc", + "files": [] }, "examples": { "b": { - "id": "3afb5082-69cd-4fae-acdb-d1e11fae0ad9", - "created_at": "2024-10-24T13:05:37.671Z", - "title": "kpnpqkguezjbqkdovxxyntdgxnapmaxmuymsittwyfxg", - "body": "namsgqdxp", + "id": "719d4939-bb0f-40bb-a128-97975b86ee4a", + "created_at": "2024-10-15T17:00:38.990Z", + "title": "vanpbojvbxq", + "body": "nzwst", "files": [ { - "name": null, - "extension": null, - "url": "https://msnlcejwaq.ndr" - }, - { - "name": null, - "extension": null, - "url": "https://swfrjilcli.kmd" - }, - { - "name": "wdgjvqqpdgubfkefnirfykpcmqchbrnkhppdbvktjeajsfistmujdlrliczkwnr", + "name": "erztzifbuxopazhulgbmrkyyaydzadbwdaqkycxxvcmhowcnzphrehbgpxlhwdzwiuusmgrxfvehlxjqknwcfqcxduvrtlopdqrhafxqtxfdidsgomhjyqnsdyfwhbeylczbwzegzibyrdhgwrkpihdyfongccryxbckbpfhshbfvenwjwugsxiwauyowwknyxutflnpzrstsesthzvd", "extension": null, - "url": "https://ngiajnriuk.wiz" + "url": "https://ucdvmprvyb.gfz" } ] }, "a": { - "id": "5dd0ec59-2019-40f7-95ac-1057c5621928", - "created_at": "2024-11-04T20:32:15.411Z", - "title": "zsku", - "body": "npkajdl", - "files": [ - { - "name": null, - "extension": "sc", - "url": "https://juzlftijtz.foo" - } - ] + "id": "d17a47e0-2094-41a4-a252-778dd32947b6", + "created_at": "2024-10-31T04:54:39.171Z", + "title": "mywghzxuyjqkmzyfyuhwyhiqnwfd", + "body": "ztgfg", + "files": [] } } } diff --git a/test/package.json b/test/package.json index c53a3ddf5..e598c7139 100644 --- a/test/package.json +++ b/test/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@samchon/nestia-test", - "version": "3.19.0-dev.20241111", + "version": "3.19.1", "description": "Test program of Nestia", "main": "index.js", "scripts": { @@ -26,7 +26,7 @@ }, "homepage": "https://nestia.io", "devDependencies": { - "@nestia/sdk": "^3.19.0-dev.20241111", + "@nestia/sdk": "^3.19.1", "@nestjs/swagger": "^8.0.5", "@samchon/openapi": "^1.2.2", "@types/express": "^4.17.17", @@ -40,9 +40,9 @@ }, "dependencies": { "@fastify/multipart": "^8.1.0", - "@nestia/core": "^3.19.0-dev.20241111", + "@nestia/core": "^3.19.1", "@nestia/e2e": "^0.7.0", - "@nestia/fetcher": "^3.19.0-dev.20241111", + "@nestia/fetcher": "^3.19.1", "@nestjs/common": "^10.4.7", "@nestjs/core": "^10.4.7", "@nestjs/platform-express": "^10.4.7", diff --git a/test/template/success/src/test/features/api/test_api_performance.ts b/test/template/success/src/test/features/api/test_api_performance.ts deleted file mode 100644 index df2b434d7..000000000 --- a/test/template/success/src/test/features/api/test_api_performance.ts +++ /dev/null @@ -1,12 +0,0 @@ -import typia from "typia"; - -import api from "@api"; -import { IPerformance } from "@api/lib/structures/IPerformance"; - -export const test_api_monitor_performance = async ( - connection: api.IConnection, -): Promise => { - const performance: IPerformance = - await api.functional.performance.get(connection); - typia.assert(performance); -}; diff --git a/website/package.json b/website/package.json index b09755dbe..6dce6a078 100644 --- a/website/package.json +++ b/website/package.json @@ -23,7 +23,7 @@ "@mui/icons-material": "5.15.6", "@mui/material": "5.15.6", "@mui/system": "5.15.6", - "@nestia/editor": "^0.7.1", + "@nestia/editor": "^0.8.0", "next": "14.2.13", "nextra": "^2.13.4", "nextra-theme-docs": "^2.13.4",