Skip to content

Commit

Permalink
Merge pull request #12 from samchon/features/3rd
Browse files Browse the repository at this point in the history
Change type limit from `int32` to `int64`.
  • Loading branch information
samchon authored Apr 17, 2024
2 parents 759ced8 + 3e931fa commit f2af77f
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@samchon/openapi",
"version": "0.1.14",
"version": "0.1.15",
"description": "OpenAPI definitions and converters for 'typia' and 'nestia'.",
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
Expand Down
26 changes: 15 additions & 11 deletions src/OpenApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,20 +208,24 @@ export namespace OpenApi {
default?: boolean;
}
export interface IInteger extends __ISignificant<"integer"> {
/** @type int */ default?: number;
/** @type int */ minimum?: number;
/** @type int */ maximum?: number;
/** @type int64 */ default?: number;
/** @type int64 */ minimum?: number;
/** @type int64 */ maximum?: number;
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
/** @type uint */ multipleOf?: number;
/**
* @type uint64
* @exclusiveMinimum 0
*/
multipleOf?: number;
}
export interface INumber extends __ISignificant<"number"> {
default?: number;
minimum?: number;
maximum?: number;
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
multipleOf?: number;
/** @exclusiveMinimum 0 */ multipleOf?: number;
}
export interface IString extends __ISignificant<"string"> {
contentMediaType?: string;
Expand Down Expand Up @@ -252,20 +256,20 @@ export namespace OpenApi {
| "relative-json-pointer"
| (string & {});
pattern?: string;
/** @type uint */ minLength?: number;
/** @type uint */ maxLength?: number;
/** @type uint64 */ minLength?: number;
/** @type uint64 */ maxLength?: number;
}

export interface IArray extends __ISignificant<"array"> {
items: IJsonSchema;
/** @type uint */ minItems?: number;
/** @type uint */ maxItems?: number;
/** @type uint64 */ minItems?: number;
/** @type uint64 */ maxItems?: number;
}
export interface ITuple extends __ISignificant<"array"> {
prefixItems: IJsonSchema[];
additionalItems: boolean | IJsonSchema;
/** @type uint */ minItems?: number;
/** @type uint */ maxItems?: number;
/** @type uint64 */ minItems?: number;
/** @type uint64 */ maxItems?: number;
}
export interface IObject extends __ISignificant<"object"> {
properties?: Record<string, IJsonSchema>;
Expand Down
24 changes: 14 additions & 10 deletions src/OpenApiV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,17 @@ export namespace OpenApiV3 {
enum?: boolean[];
}
export interface IInteger extends __ISignificant<"integer"> {
/** @type int */ default?: number;
/** @type int */ enum?: number[];
/** @type int */ minimum?: number;
/** @type int */ maximum?: number;
/** @type int64 */ default?: number;
/** @type int64 */ enum?: number[];
/** @type int64 */ minimum?: number;
/** @type int64 */ maximum?: number;
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
/** @type uint */ multipleOf?: number;
/**
* @type uint64
* @exclusiveMinimum 0
*/
multipleOf?: number;
}
export interface INumber extends __ISignificant<"number"> {
default?: number;
Expand All @@ -181,7 +185,7 @@ export namespace OpenApiV3 {
maximum?: number;
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
multipleOf?: number;
/** @exclusiveMinimum 0 */ multipleOf?: number;
}
export interface IString extends __ISignificant<"string"> {
default?: string;
Expand Down Expand Up @@ -212,15 +216,15 @@ export namespace OpenApiV3 {
| "relative-json-pointer"
| (string & {});
pattern?: string;
/** @type uint */ minLength?: number;
/** @type uint */ maxLength?: number;
/** @type uint64 */ minLength?: number;
/** @type uint64 */ maxLength?: number;
}

export interface IArray extends __ISignificant<"array"> {
items: IJsonSchema;
uniqueItems?: boolean;
/** @type uint */ minItems?: number;
/** @type uint */ maxItems?: number;
/** @type uint64 */ minItems?: number;
/** @type uint64 */ maxItems?: number;
}
export interface IObject extends __ISignificant<"object"> {
properties?: Record<string, IJsonSchema>;
Expand Down
28 changes: 16 additions & 12 deletions src/OpenApiV3_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,17 @@ export namespace OpenApiV3_1 {
enum?: boolean[];
}
export interface IInteger extends __ISignificant<"integer"> {
/** @type int */ default?: number;
/** @type int */ enum?: number[];
/** @type int */ minimum?: number;
/** @type int */ maximum?: number;
/** @type int */ exclusiveMinimum?: number | boolean;
/** @type int */ exclusiveMaximum?: number | boolean;
/** @type uint */ multipleOf?: number;
/** @type int64 */ default?: number;
/** @type int64 */ enum?: number[];
/** @type int64 */ minimum?: number;
/** @type int64 */ maximum?: number;
/** @type int64 */ exclusiveMinimum?: number | boolean;
/** @type int64 */ exclusiveMaximum?: number | boolean;
/**
* @type uint64
* @exclusiveMinimum 0
*/
multipleOf?: number;
}
export interface INumber extends __ISignificant<"number"> {
default?: number;
Expand All @@ -210,7 +214,7 @@ export namespace OpenApiV3_1 {
maximum?: number;
exclusiveMinimum?: number | boolean;
exclusiveMaximum?: number | boolean;
multipleOf?: number;
/** @exclusiveMinimum 0 */ multipleOf?: number;
}
export interface IString extends __ISignificant<"string"> {
contentMediaType?: string;
Expand Down Expand Up @@ -242,8 +246,8 @@ export namespace OpenApiV3_1 {
| "relative-json-pointer"
| (string & {});
pattern?: string;
/** @type uint */ minLength?: number;
/** @type uint */ maxLength?: number;
/** @type uint64 */ minLength?: number;
/** @type uint64 */ maxLength?: number;
}

export interface IUnknown extends __IAttribute {
Expand All @@ -265,8 +269,8 @@ export namespace OpenApiV3_1 {
prefixItems?: IJsonSchema[];
uniqueItems?: boolean;
additionalItems?: boolean | IJsonSchema;
/** @type uint */ minItems?: number;
/** @type uint */ maxItems?: number;
/** @type uint64 */ minItems?: number;
/** @type uint64 */ maxItems?: number;
}
export interface IObject extends __ISignificant<"object"> {
properties?: Record<string, IJsonSchema>;
Expand Down
24 changes: 14 additions & 10 deletions src/SwaggerV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,17 @@ export namespace SwaggerV2 {
enum?: boolean[];
}
export interface IInteger extends __ISignificant<"integer"> {
/** @type int */ default?: number;
/** @type int */ enum?: number[];
/** @type int */ minimum?: number;
/** @type int */ maximum?: number;
/** @type int64 */ default?: number;
/** @type int64 */ enum?: number[];
/** @type int64 */ minimum?: number;
/** @type int64 */ maximum?: number;
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
/** @type uint */ multipleOf?: number;
/**
* @type uint64
* @exclusiveMinimum 0
*/
multipleOf?: number;
}
export interface INumber extends __ISignificant<"number"> {
default?: number;
Expand All @@ -149,7 +153,7 @@ export namespace SwaggerV2 {
maximum?: number;
exclusiveMinimum?: boolean;
exclusiveMaximum?: boolean;
multipleOf?: number;
/** @exclusiveMinimum 0 */ multipleOf?: number;
}
export interface IString extends __ISignificant<"string"> {
default?: string;
Expand Down Expand Up @@ -180,15 +184,15 @@ export namespace SwaggerV2 {
| "relative-json-pointer"
| (string & {});
pattern?: string;
/** @type uint */ minLength?: number;
/** @type uint */ maxLength?: number;
/** @type uint64 */ minLength?: number;
/** @type uint64 */ maxLength?: number;
}

export interface IArray extends __ISignificant<"array"> {
items: IJsonSchema;
uniqueItems?: boolean;
/** @type uint */ minItems?: number;
/** @type uint */ maxItems?: number;
/** @type uint64 */ minItems?: number;
/** @type uint64 */ maxItems?: number;
}
export interface IObject extends __ISignificant<"object"> {
properties?: Record<string, IJsonSchema>;
Expand Down

0 comments on commit f2af77f

Please sign in to comment.