stoplightio / http-spec

Utilities to normalize OpenAPI v2 and v3 objects for the Stoplight ecosystem.
https://stoplight.io
Apache License 2.0
20 stars 12 forks source link

fix(oas): change how exclusiveMin & Max are handled #222

Closed brendarearden closed 1 year ago

brendarearden commented 1 year ago

Motivation and Context

As part of supporting OAS 3.1 exporter, I noticed that exclusiveMinimum and exclusiveMaximum values were not being preserved. Since we handle changing this behavior with the drafts, it makes sense to preserve these values during the http spec process

Reminder: OAS3 - exclusiveMin / Max are booleans OAS3.1 - exclusiveMin / Max are integers

https://github.com/stoplightio/platform-internal/issues/15265

Description

check to see if value is a number and do not delete from schema if it is

How Has This Been Tested?

added test to capture exclusiveMin / Max with integer value yarn test locally yalc'd into platform internal and confirmed that all exporter tests (oas2, 3, 3.1) are passsing

Types of changes

Checklist

stoplight-bot commented 1 year ago

:tada: This PR is included in version 5.6.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: