Open rv1971 opened 3 years ago
Since such a property cannot be accessed as
$obj->x-internal-id
it is possible to access these like $obj->{'x-internal-id'}
. Converting the name is a bit arbitrary, need to think about it.
A better solution might be to implement ArrayAccess interface to allow $obj['x-internal-id']
.
Linking for reference: http://spec.openapis.org/oas/v3.0.3#specification-extensions
realted to #121
The OpenAPI specification allows for extension properties whose names must start with
x-
, citingx-internal-id
as an example. Since such a property cannot be accessed as$obj->x-internal-id
, the present commit translates the name so that it can be accessed as$obj->x_internal_id
.