Skip to content

Commit ba62457

Browse files
zobznmastermatt
authored andcommitted
fix: exclusive minimum and exclusive maximum are numbers
1 parent b2a5ae9 commit ba62457

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

e2e/api-spec.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,8 @@
286286
"required": true,
287287
"in": "query",
288288
"schema": {
289-
"minimum": 0,
290-
"maximum": 10000,
291-
"exclusiveMaximum": true,
292-
"exclusiveMinimum": true,
289+
"exclusiveMinimum": 0,
290+
"exclusiveMaximum": 10000,
293291
"title": "Page",
294292
"format": "int32",
295293
"default": 0,
@@ -483,10 +481,8 @@
483481
"in": "query",
484482
"required": true,
485483
"schema": {
486-
"minimum": 0,
487-
"maximum": 10000,
488-
"exclusiveMaximum": true,
489-
"exclusiveMinimum": true,
484+
"exclusiveMinimum": 0,
485+
"exclusiveMaximum": 10000,
490486
"title": "Page",
491487
"format": "int32",
492488
"default": 0,

e2e/src/cats/dto/pagination-query.dto.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ export enum LettersEnum {
88

99
export class PaginationQuery {
1010
@ApiProperty({
11-
minimum: 0,
12-
maximum: 10000,
11+
exclusiveMinimum: 0,
12+
exclusiveMaximum: 10000,
1313
title: 'Page',
14-
exclusiveMaximum: true,
15-
exclusiveMinimum: true,
1614
format: 'int32',
1715
default: 0
1816
})

lib/interfaces/open-api-spec.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,9 @@ export interface SchemaObject {
219219
title?: string;
220220
multipleOf?: number;
221221
maximum?: number;
222-
exclusiveMaximum?: boolean;
222+
exclusiveMaximum?: boolean | number;
223223
minimum?: number;
224-
exclusiveMinimum?: boolean;
224+
exclusiveMinimum?: boolean | number;
225225
maxLength?: number;
226226
minLength?: number;
227227
pattern?: string;

0 commit comments

Comments
 (0)