You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
The current implementation of Body/WebFormBody's createFromArray method does not support the shortcut: !!null. Judging by the spec, this is legitimate:
/jobs:
post:
description: Create a Jobbody:
text/xml: !!nullapplication/json: !!null
At present, using RamlParser over that schema will result in:
PHPCatchable fatal error: Argument2 passed to Raml\Body::createFromArray() must be of the type array, string given, called in alecsammon/php-raml-parser/src/Method.php on line 143 and defined in alecsammon/php-raml-parser/src/Body.php on line 87
Response does not check the key for a valid media type, and it attempts to loosely handle a 'falsey' body by passing an empty array. Unfortunately !!null isn't going to trigger this logic, so it too will also fail.
I suggest we update all three calling locations to correctly handle !!null
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The current implementation of
Body
/WebFormBody
'screateFromArray
method does not support the shortcut:!!null
. Judging by the spec, this is legitimate:At present, using RamlParser over that schema will result in:
We currently call
createFromArray
from three locations,Method
,Response
andSecuritySchemeDescribedBy
and unfortunately, we are inconsistent.Response
does not check the key for a valid media type, and it attempts to loosely handle a 'falsey' body by passing an empty array. Unfortunately!!null
isn't going to trigger this logic, so it too will also fail.I suggest we update all three calling locations to correctly handle
!!null
The text was updated successfully, but these errors were encountered: