-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
redocly lint
fails for exclusiveMinimum
in an OpenAPI 3.0 spec
#2467
Comments
Can you explain why you think this is a Redocly issue? I don't see Redocly used in the Joi package. When I try to reproduce it: this is giving me the correct validationopenapi: 3.0.3
info:
title: blah
version: 1.0.0
servers:
- url: www.redocly.com
paths:
/v1/thing:
get:
summary: a summary
description: a description
responses:
"200":
description: OK
content:
application/json:
schema:
type: number
minimum: 0
exclusiveMinimum: true This throws forExpected type `boolean` but got `integer`. openapi: 3.0.3
info:
title: blah
version: 1.0.0
servers:
- url: www.redocly.com
paths:
/v1/thing:
get:
summary: a summary
description: a description
responses:
"200":
description: OK
content:
application/json:
schema:
type: number
exclusiveMinimum: 0 redocly 1.5.0 |
Thank you for the apt response. (The issue I tried to report has nothing to do with Joi, or any other library. That was just a side note and cross-reference.) You're tests are undoubtedly correct, and seem to negate my report. I reported what I encountered, and this shows that I probably missed the boat. I'll try to find the time to dig a little deeper, and report back. |
Try updating your redocly package.
Happy to help if you still encounter the same issue. |
It doesn't look like there's anything more for us to do here, so I'll close the issue for now - but do let us know if you need anything else. |
Describe the bug
In an OpenAPI spec that says:
redocly lint
returnsThis is because of a non-backward compatible (!) change from OpenAPI 3.0 to OpenAPI 3.1, as described in ExclusiveMinimum and ExclusiveMaximum.
Expected behavior
The schema should pass when the OpenAPI spec says it is version 3.0, unless
redoc
no longer supports this version.Note
This creates issues when using
joi-to-json
≥ 4.1.0 (see kenspirit/joi-to-json#49).The text was updated successfully, but these errors were encountered: