Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong exclusiveMinimum/exclusiveMaximum validation in OpenApi 3.0.3 #4545

Open
RastislavGraus opened this issue Nov 6, 2023 · 1 comment

Comments

@RastislavGraus
Copy link

Q&A (please complete the following information)

  • OS: Windows
  • Browser: chrome
  • Version: 119.0.6045.105
  • Method of installation: installation wizard
  • Swagger-Editor version: 5.0.0-alpha.79
  • Swagger/OpenAPI version: OpenAPI 3.0.3

Content & configuration

Open public Swagger-Editor on URI https://editor-next.swagger.io/ and paste my OpenApi definition in it.

Example Swagger/OpenAPI definition:
openapi: 3.0.3
info:
description: Wrong validation
title: Validation
version: 1.0.0
paths:
components:
schemas:
Data:
properties:
quantity:
type: number
minimum: 0.000
exclusiveMinimum: true
type: object

Swagger-Editor configuration options:
default

Describe the bug you're encountering

After paste of given OpenApi definition, you get a wrong validation error:
"14 | 10017 | exclusiveMinimum' value must be a number".
According to documentation https://swagger.io/docs/specification/data-models/data-types/#numbers is my definition correct.

To reproduce...

Steps to reproduce the behavior:

  1. Go to 'https://editor-next.swagger.io/'
  2. Paste given definition (yaml)
  3. See error

Expected behavior

No validation error will be displayed

Screenshots

Additional context or thoughts

@mdaneri
Copy link

mdaneri commented Dec 31, 2023

In openapi 3.0.x eclusiveMinimum and exclusiveMaximus must be a number
With openapi 3.1 both are booleans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants