Closed
Description
I'm using x-* extensions in a number of places and wanted to split up my OAS doc over multiple files. If I have a x-subscription
content inline in the main file at root level, like this:
"x-subscriptions": [
{
"on": "some.event",
"do": [
{
//...
}
]
}
Then after I do $specs = Reader::readFromJsonFile(realpath($specPath));
I can access the subscriptions, eg var_dump($spec->{'x-subscriptions'});
gives me:
array(1) {
[0]=>
array(2) {
["on"]=>
string(32) "some.event"
["do"]=>
array(1) {
...
But if I have:
"x-subscriptions": {
"$ref": "./x-subscriptions/some-event.json"
},
with the full array moved to another file, the same $spec
calls returns:
array(1) {
["$ref"]=>
string(46) "./x-subscriptions/some-event.json"
}
I've tried a variety of ways (using 'allOf', having the array be in the root and reference individual events, etc.) but the reference doesn't resolve.
So I guess my question is; should it?
Thanks!