Skip to content

Commit

Permalink
Demonstrate #628 - show how exactOptionalPropertyTypes works
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Sep 29, 2023
1 parent 0c97662 commit 795d9d5
Show file tree
Hide file tree
Showing 34 changed files with 715 additions and 780 deletions.
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/core",
"version": "2.1.4",
"version": "0.0.0-dev.20991231",
"description": "Super-fast validation decorators of NestJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -34,7 +34,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^2.1.4",
"@nestia/fetcher": "D:\\github\\samchon\\nestia\\packages\\fetcher\\nestia-fetcher-0.0.0-dev.20991231.tgz",
"@nestjs/common": ">= 7.0.1",
"@nestjs/core": ">= 7.0.1",
"@nestjs/platform-express": ">= 7.0.1",
Expand All @@ -47,7 +47,7 @@
"typia": "^5.1.3"
},
"peerDependencies": {
"@nestia/fetcher": ">=2.1.4",
"@nestia/fetcher": ">=0.0.0-dev.20991231",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"@nestjs/platform-express": ">=7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/fetcher",
"version": "2.1.4",
"version": "0.0.0-dev.20991231",
"description": "Fetcher library of Nestia SDK",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/sdk",
"version": "2.1.4",
"version": "0.0.0-dev.20991231",
"description": "Nestia SDK and Swagger generator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^2.1.4",
"@nestia/fetcher": "D:\\github\\samchon\\nestia\\packages\\fetcher\\nestia-fetcher-0.0.0-dev.20991231.tgz",
"cli": "^1.0.1",
"glob": "^7.2.0",
"path-to-regexp": "^6.2.1",
Expand All @@ -47,7 +47,7 @@
"typia": "^5.1.3"
},
"peerDependencies": {
"@nestia/fetcher": ">=2.1.4",
"@nestia/fetcher": ">=0.0.0-dev.20991231",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import type { IJsonSchema } from "./IJsonSchema";

export type IArrayIIdentified = {
items: IJsonSchema;
minItems?: undefined | (number & Type<"uint32">);
maxItems?: undefined | (number & Type<"uint32">);
"x-typia-tuple"?: undefined | IJsonSchema.ITuple;
minItems?: (number & Type<"uint32">);
maxItems?: (number & Type<"uint32">);
"x-typia-tuple"?: IJsonSchema.ITuple;
type: ("array");
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
deprecated?: undefined | boolean;
title?: undefined | string;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-required"?: undefined | boolean;
"x-typia-optional"?: undefined | boolean;
"x-typia-rest"?: undefined | boolean;
$id?: undefined | string;
$recursiveAnchor?: undefined | boolean;
nullable?: boolean;
deprecated?: boolean;
title?: string;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-required"?: boolean;
"x-typia-optional"?: boolean;
"x-typia-rest"?: boolean;
$id?: string;
$recursiveAnchor?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ import type { IJsDocTagInfo } from "./IJsDocTagInfo";
import type { IMetadataTypeTag } from "./IMetadataTypeTag";

export type IBooleanIIdentified = {
"x-typia-typeTags"?: undefined | Array<IMetadataTypeTag>;
"default"?: undefined | boolean;
"x-typia-typeTags"?: Array<IMetadataTypeTag>;
"default"?: boolean;
type: ("boolean");
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
deprecated?: undefined | boolean;
title?: undefined | string;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-required"?: undefined | boolean;
"x-typia-optional"?: undefined | boolean;
"x-typia-rest"?: undefined | boolean;
$id?: undefined | string;
$recursiveAnchor?: undefined | boolean;
nullable?: boolean;
deprecated?: boolean;
title?: string;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-required"?: boolean;
"x-typia-optional"?: boolean;
"x-typia-rest"?: boolean;
$id?: string;
$recursiveAnchor?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import type { IJsDocTagInfo } from "./IJsDocTagInfo";
export type IEnumerationbooleanIIdentified = {
"enum": Array<boolean>;
type: ("boolean");
"default"?: undefined | boolean;
"default"?: boolean;
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
deprecated?: undefined | boolean;
title?: undefined | string;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-required"?: undefined | boolean;
"x-typia-optional"?: undefined | boolean;
"x-typia-rest"?: undefined | boolean;
$id?: undefined | string;
$recursiveAnchor?: undefined | boolean;
nullable?: boolean;
deprecated?: boolean;
title?: string;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-required"?: boolean;
"x-typia-optional"?: boolean;
"x-typia-rest"?: boolean;
$id?: string;
$recursiveAnchor?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import type { IJsDocTagInfo } from "./IJsDocTagInfo";
export type IEnumerationnumberIIdentified = {
"enum": Array<number>;
type: ("number");
"default"?: undefined | number;
"default"?: number;
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
deprecated?: undefined | boolean;
title?: undefined | string;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-required"?: undefined | boolean;
"x-typia-optional"?: undefined | boolean;
"x-typia-rest"?: undefined | boolean;
$id?: undefined | string;
$recursiveAnchor?: undefined | boolean;
nullable?: boolean;
deprecated?: boolean;
title?: string;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-required"?: boolean;
"x-typia-optional"?: boolean;
"x-typia-rest"?: boolean;
$id?: string;
$recursiveAnchor?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import type { IJsDocTagInfo } from "./IJsDocTagInfo";
export type IEnumerationstringIIdentified = {
"enum": Array<string>;
type: ("string");
"default"?: undefined | string;
"default"?: string;
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
deprecated?: undefined | boolean;
title?: undefined | string;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-required"?: undefined | boolean;
"x-typia-optional"?: undefined | boolean;
"x-typia-rest"?: undefined | boolean;
$id?: undefined | string;
$recursiveAnchor?: undefined | boolean;
nullable?: boolean;
deprecated?: boolean;
title?: string;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-required"?: boolean;
"x-typia-optional"?: boolean;
"x-typia-rest"?: boolean;
$id?: string;
$recursiveAnchor?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ import type { IJsDocTagInfo } from "./IJsDocTagInfo";
import type { IMetadataTypeTag } from "./IMetadataTypeTag";

export type IIntegerIIdentified = {
minimum?: undefined | (number & Type<"int32">);
maximum?: undefined | (number & Type<"int32">);
exclusiveMinimum?: undefined | boolean;
exclusiveMaximum?: undefined | boolean;
multipleOf?: undefined | (number & Type<"int32">);
"x-typia-typeTags"?: undefined | Array<IMetadataTypeTag>;
"default"?: undefined | number;
minimum?: (number & Type<"int32">);
maximum?: (number & Type<"int32">);
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
multipleOf?: (number & Type<"int32">);
"x-typia-typeTags"?: Array<IMetadataTypeTag>;
"default"?: number;
type: ("integer");
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
deprecated?: undefined | boolean;
title?: undefined | string;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-required"?: undefined | boolean;
"x-typia-optional"?: undefined | boolean;
"x-typia-rest"?: undefined | boolean;
$id?: undefined | string;
$recursiveAnchor?: undefined | boolean;
nullable?: boolean;
deprecated?: boolean;
title?: string;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-required"?: boolean;
"x-typia-optional"?: boolean;
"x-typia-rest"?: boolean;
$id?: string;
$recursiveAnchor?: boolean;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export type IJsDocTagInfo = {
name: string;
text?: undefined | Array<IJsDocTagInfo.IText>;
text?: Array<IJsDocTagInfo.IText>;
}
export namespace IJsDocTagInfo {
export type IText = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import type { RecordstringIJsonSchema } from "./RecordstringIJsonSchema";

export namespace IJsonComponents {
export type IObject = {
$id?: undefined | string;
$id?: string;
type: ("object");
/**
* Only when swagger mode.
*/
nullable?: undefined | boolean;
nullable?: boolean;
properties: RecordstringIJsonSchema;
patternProperties?: undefined | RecordstringIJsonSchema;
additionalProperties?: undefined | IJsonSchema.IEnumerationboolean | IJsonSchema.IEnumerationnumber | IJsonSchema.IEnumerationstring | IJsonSchema.IBoolean | IJsonSchema.IInteger | IJsonSchema.INumber | IJsonSchema.IString | IJsonSchema.IArray | IJsonSchema.ITuple | IJsonSchema.IOneOf | IJsonSchema.IReference | IJsonSchema.INullOnly | IJsonSchema.IUnknown;
required?: undefined | Array<string>;
description?: undefined | string;
"x-typia-jsDocTags"?: undefined | Array<IJsDocTagInfo>;
"x-typia-patternProperties"?: undefined | RecordstringIJsonSchema;
"x-typia-additionalProperties"?: undefined | IJsonSchema.IEnumerationboolean | IJsonSchema.IEnumerationnumber | IJsonSchema.IEnumerationstring | IJsonSchema.IBoolean | IJsonSchema.IInteger | IJsonSchema.INumber | IJsonSchema.IString | IJsonSchema.IArray | IJsonSchema.ITuple | IJsonSchema.IOneOf | IJsonSchema.IReference | IJsonSchema.INullOnly | IJsonSchema.IUnknown;
patternProperties?: RecordstringIJsonSchema;
additionalProperties?: IJsonSchema;
required?: Array<string>;
description?: string;
"x-typia-jsDocTags"?: Array<IJsDocTagInfo>;
"x-typia-patternProperties"?: RecordstringIJsonSchema;
"x-typia-additionalProperties"?: IJsonSchema;
}
}
Loading

0 comments on commit 795d9d5

Please sign in to comment.