redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

fix: error with invalid type when using exclusiveMininimum and exclusiveMaximum in OpenApi 3.0

Open AlbinaBlazhko17 opened this issue 2 months ago • 3 comments

What/Why/How?

The ajv validator, which we are using to validate JSON Schemas didn't supports exclusiveMininimum and exclusiveMaximum properties as boolean type. That's why i need to use old draft-04 version to have a proper validation for these properties. Also, this old draft-04 version supports only old refs with uri, that's why we need to create own fork and publish own package to npm called @redocly/ajv-draft-04.

Reference

Resolves #1610

Testing

Ran tests new and created.

Screenshots (optional)

Check yourself

  • [ ] Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • [x] All new/updated code is covered by tests
  • [x] New package installed? - Tested in different environments (browser/node)
  • [x] Documentation update considered

Security

  • [x] The security impact of the change has been considered
  • [x] Code follows company security practices and guidelines

AlbinaBlazhko17 avatar Oct 23 '25 15:10 AlbinaBlazhko17

🦋 Changeset detected

Latest commit: 7dfdffa96e6a9808763b16a9df1829793e329be3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/openapi-core Patch
@redocly/cli Patch
@redocly/respect-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Oct 23 '25 15:10 changeset-bot[bot]

Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.457 ± 0.022 1.431 1.509 1.00 ± 0.02
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.451 ± 0.028 1.411 1.512 1.00

github-actions[bot] avatar Oct 23 '25 16:10 github-actions[bot]

Could you check if we need to adjust types in the no-invalid-schema-examples rule itself? (See this comment.)

tatomyr avatar Oct 24 '25 07:10 tatomyr