Skip to content

Commit

Permalink
Merge pull request #2994 from nestjs/revert-2909-fix-exclusive-min-ma…
Browse files Browse the repository at this point in the history
…x-types

Revert "fix: exclusive minimum and exclusive maximum are numbers"
  • Loading branch information
kamilmysliwiec authored Jul 1, 2024
2 parents c541886 + 9614b1d commit 6f1ee0c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 8 additions & 4 deletions e2e/api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,10 @@
"required": true,
"in": "query",
"schema": {
"exclusiveMinimum": 0,
"exclusiveMaximum": 10000,
"minimum": 0,
"maximum": 10000,
"exclusiveMaximum": true,
"exclusiveMinimum": true,
"title": "Page",
"format": "int32",
"default": 0,
Expand Down Expand Up @@ -481,8 +483,10 @@
"in": "query",
"required": true,
"schema": {
"exclusiveMinimum": 0,
"exclusiveMaximum": 10000,
"minimum": 0,
"maximum": 10000,
"exclusiveMaximum": true,
"exclusiveMinimum": true,
"title": "Page",
"format": "int32",
"default": 0,
Expand Down
6 changes: 4 additions & 2 deletions e2e/src/cats/dto/pagination-query.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ export enum LettersEnum {

export class PaginationQuery {
@ApiProperty({
exclusiveMinimum: 0,
exclusiveMaximum: 10000,
minimum: 0,
maximum: 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 | number;
exclusiveMaximum?: boolean;
minimum?: number;
exclusiveMinimum?: boolean | number;
exclusiveMinimum?: boolean;
maxLength?: number;
minLength?: number;
pattern?: string;
Expand Down

0 comments on commit 6f1ee0c

Please sign in to comment.