Closed khart-twilio closed 3 weeks ago
@daveshanley One edge case I noticed when testing:
I had:
...
requestBody:
content:
application/json:
schema:
type: array
items:
type: object
properties:
value:
type: null # null isn't allowed here I don't think according to the spec
And with these changes in libopenapi it is now being processed and spit out as
...
properties:
value:
type: "ObjectNode"
It doesn't matter for this case since using null
was invalid and I changed it to something else, but I'm wondering if it might matter in other places. I'm not familiar with how things like null
, true
, false
come through as yaml.Node object when deserialized and if I'd need to handle these cases in the changes.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.62%. Comparing base (
0e74598
) to head (2ba004f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@daveshanley One edge case I noticed when testing:
I had:
... requestBody: content: application/json: schema: type: array items: type: object properties: value: type: null # null isn't allowed here I don't think according to the spec
And with these changes in libopenapi it is now being processed and spit out as
... properties: value: type: "ObjectNode"
It doesn't matter for this case since using
null
was invalid and I changed it to something else, but I'm wondering if it might matter in other places. I'm not familiar with how things likenull
,true
,false
come through as yaml.Node object when deserialized and if I'd need to handle these cases in the changes.
I have no idea where ObjectNode
is coming from. It's not part of libopenapi
Because I have no idea, let's just proceed, if someone else finds this issue then we can investigate further.
see https://github.com/pb33f/libopenapi/issues/289
This is my naive attempt to fix the issue. It works but it may have negative side-effects I'm not aware of.