diff --git a/src/Annotations/AbstractAnnotation.php b/src/Annotations/AbstractAnnotation.php index 1c8bac50..63d2a236 100644 --- a/src/Annotations/AbstractAnnotation.php +++ b/src/Annotations/AbstractAnnotation.php @@ -399,6 +399,24 @@ public function jsonSerialize() } unset($data->nullable); } + + if (isset($data->minimum) && isset($data->exclusiveMinimum)) { + if (true === $data->exclusiveMinimum) { + $data->exclusiveMinimum = $data->minimum; + unset($data->minimum); + } elseif (false === $data->exclusiveMinimum) { + unset($data->exclusiveMinimum); + } + } + + if (isset($data->maximum) && isset($data->exclusiveMaximum)) { + if (true === $data->exclusiveMaximum) { + $data->exclusiveMaximum = $data->maximum; + unset($data->maximum); + } elseif (false === $data->exclusiveMaximum) { + unset($data->exclusiveMaximum); + } + } } return $data;