Skip to content

Commit

Permalink
Merge pull request #2909 from mastermatt/fix-exclusive-min-max-types
Browse files Browse the repository at this point in the history
fix: exclusive minimum and exclusive maximum are numbers
  • Loading branch information
kamilmysliwiec authored Jul 1, 2024
2 parents b7eeffd + ba62457 commit d675211
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
12 changes: 4 additions & 8 deletions e2e/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,8 @@
"required": true,
"in": "query",
"schema": {
"minimum": 0,
"maximum": 10000,
"exclusiveMaximum": true,
"exclusiveMinimum": true,
"exclusiveMinimum": 0,
"exclusiveMaximum": 10000,
"title": "Page",
"format": "int32",
"default": 0,
Expand Down Expand Up @@ -483,10 +481,8 @@
"in": "query",
"required": true,
"schema": {
"minimum": 0,
"maximum": 10000,
"exclusiveMaximum": true,
"exclusiveMinimum": true,
"exclusiveMinimum": 0,
"exclusiveMaximum": 10000,
"title": "Page",
"format": "int32",
"default": 0,
Expand Down
6 changes: 2 additions & 4 deletions e2e/src/cats/dto/pagination-query.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ export enum LettersEnum {

export class PaginationQuery {
@ApiProperty({
minimum: 0,
maximum: 10000,
exclusiveMinimum: 0,
exclusiveMaximum: 10000,
title: 'Page',
exclusiveMaximum: true,
exclusiveMinimum: true,
format: 'int32',
default: 0
})
Expand Down
4 changes: 2 additions & 2 deletions lib/interfaces/open-api-spec.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ export interface SchemaObject {
title?: string;
multipleOf?: number;
maximum?: number;
exclusiveMaximum?: boolean;
exclusiveMaximum?: boolean | number;
minimum?: number;
exclusiveMinimum?: boolean;
exclusiveMinimum?: boolean | number;
maxLength?: number;
minLength?: number;
pattern?: string;
Expand Down

0 comments on commit d675211

Please sign in to comment.