fix(netbox): use numeric exclusiveMinimum/exclusiveMaximum - #42
Merged
jennlu330 merged 2 commits intoJul 23, 2026
Merged
Conversation
…latest.json Several schemas (rf_channel_frequency, weight, length, distance, etc.) used the OpenAPI 3.0 boolean-flag style (minimum/maximum + exclusiveMinimum: true), which ajv rejects when validating exclusiveMinimum/exclusiveMaximum as numbers. Convert to the numeric form and drop the redundant minimum/maximum keys, resolving all associated $ref/oneOf cascade errors.
….json The platform's ajv validator turns out to be asymmetric: it requires exclusiveMinimum as a number but exclusiveMaximum as a boolean paired with a separate maximum. The prior commit converted both to numeric, which fixed exclusiveMinimum but broke exclusiveMaximum. Revert exclusiveMaximum back to boolean + maximum while keeping exclusiveMinimum numeric.
Collaborator
Author
|
Update: the platform's ajv validator turned out to be asymmetric — it requires |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
netbox-latest.jsonused the OpenAPI 3.0 boolean-flag style for range bounds (minimum/maximumpaired withexclusiveMinimum: true/exclusiveMaximum: true) on several properties (rf_channel_frequency,rf_channel_width,weight,length,distance,allocated_vcpus,validation_minimum,validation_maximum, etc.)exclusiveMinimum/exclusiveMaximumto be numeric — this was throwing 21 schema validation errors (plus cascading$ref/oneOffailures once ajv fell through to alternate schema branches)exclusiveMinimumand 47exclusiveMaximumboolean occurrences to the numeric form and dropped the now-redundantminimum/maximumkeysTest plan
exclusiveMinimum/exclusiveMaximumremain (grep -c '"exclusiveMinimum": true'/"exclusiveMaximum": true"→ 0)