-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix!: fixed handling of additionalProperties to handle the bool/json-schema nature better #180
fix!: fixed handling of additionalProperties to handle the bool/json-schema nature better #180
Conversation
…schema nature better
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
- Coverage 99.80% 99.74% -0.06%
==========================================
Files 148 148
Lines 10673 10646 -27
==========================================
- Hits 10652 10619 -33
- Misses 21 27 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -332,9 +331,12 @@ func (index *SpecIndex) ExtractRefs(node, parent *yaml.Node, seenPath []string, | |||
if len(seenPath) > 0 { | |||
lastItem := seenPath[len(seenPath)-1] | |||
if lastItem == "properties" { | |||
seenPath = append(seenPath, n.Value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daveshanley also contains a fix for enum extraction that sorts the issues we were seeing after the last change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes #175
Thank you for fixing this! The next major version jump (because this is a breaking change) will need to include #148 as well. I am not sure how much of a conflict that will create if I merge in that first, then this PR. Does that work for you? |
Yeah I can fix any conflicts when that other branch is merged |
This PR introduces a fix (via way of a breaking change) to allow a schema in an
additionalProperties
field to be accessed correctly. It also tried to standardise the access of bool/schema properties likeadditionalProperties
andunevaluatedProperties
.This basically fixes the below schema not being returned as a
SchemaProxy
:One of the breaking changes this introduces is not dealing with
additionalProperties
containing non-schema arrays or maps.It now largely expects
additionalProperties
to be compliant to json-schemaalso incidentally I found a bug that caused an infinite hang and fixed that as part of this