Skip to content

Commit 32ef8f4

Browse files
authored
Fix exported definitions (#65)
1 parent 93347a5 commit 32ef8f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ public function process($data, Context $options, $path = '#', $result = null)
10331033
if ('#' === $path) {
10341034
$injectDefinitions = new ScopeExit(function () use ($result, $options) {
10351035
foreach ($options->exportedDefinitions as $ref => $data) {
1036-
if ($data !== null) {
1036+
if ($data !== null && ($ref[0] === '#' || $ref[1] === '/')) {
10371037
JsonPointer::add($result, JsonPointer::splitPath($ref), $data,
10381038
/*JsonPointer::SKIP_IF_ISSET + */
10391039
JsonPointer::RECURSIVE_KEY_CREATION);

0 commit comments

Comments
 (0)