Skip to content

Commit

Permalink
Fix test program level bug, the optional query parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Nov 11, 2024
1 parent 9243a2c commit 7c79b77
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 569 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^3.19.0-dev.20241112",
"@nestia/fetcher": "../fetcher/nestia-fetcher-3.19.0-dev.20241112.tgz",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"@samchon/openapi": "^1.2.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/migrate/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -38,9 +38,9 @@
"homepage": "https://nestia.io",
"devDependencies": {
"@nestia/benchmark": "^0.2.3",
"@nestia/core": "^3.18.0",
"@nestia/core": "^3.19.0",
"@nestia/e2e": "^0.7.0",
"@nestia/fetcher": "^3.18.0",
"@nestia/fetcher": "^3.19.0",
"@nestjs/common": "^10.3.8",
"@nestjs/core": "^10.3.8",
"@nestjs/platform-express": "^10.3.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ 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,
example: route.body.media().example,
examples: route.body.media().examples,
}),
Expand All @@ -246,6 +250,7 @@ export namespace MigrateNestMethodProgrammer {
(importer: MigrateImportProgrammer) =>
(props: {
schema: OpenApi.IJsonSchema;
required: boolean;
example?: any;
examples?: Record<string, any>;
}): ts.ParameterDeclaration => {
Expand Down Expand Up @@ -274,7 +279,9 @@ export namespace MigrateNestMethodProgrammer {
],
undefined,
accessor.variable,
undefined,
props.required === false
? ts.factory.createToken(ts.SyntaxKind.QuestionToken)
: undefined,
MigrateSchemaProgrammer.write(components)(importer)(props.schema),
);
};
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/core": "^3.19.0-dev.20241112",
"@nestia/fetcher": "^3.19.0-dev.20241112",
"@nestia/core": "../core/nestia-core-3.19.0-dev.20241112.tgz",
"@nestia/fetcher": "../fetcher/nestia-fetcher-3.19.0-dev.20241112.tgz",
"@samchon/openapi": "^1.2.2",
"cli": "^1.0.1",
"get-function-location": "^2.0.0",
Expand Down

This file was deleted.

192 changes: 0 additions & 192 deletions test/features/query-decompose-false/src/api/functional/query/index.ts

This file was deleted.

Loading

0 comments on commit 7c79b77

Please sign in to comment.