Cant get exporter to set `$id` instead of `id` for schema id.
I'm trying to export a given schema to generate draft 7, which means use '$id' instead of 'id'. Trying with context passed to exporter, but it will keep generating id not $id.
Bug or am I doing it wrong?
So the picture I posted is the fix because it doesn't work without third ande fourth line.
Also, I looked through readme and tests, but couldn't find anything about setting version wrt. export.
Any info?
I also just try to manually set to $ownerSchema->{'$id'} and this is so weird.
https://github.com/swaggest/php-json-schema/blob/2b99251f31046f682b120fb807fea8ab688a493e/src/Structure/ClassStructureTrait.php#L106
I found that, even we've already set key data mapping :
$ownerSchema->addPropertyMapping(Schema::PROP_ID, 'id');
On json serialize wil use id rather than setted data mapping, because the previous key data mapped has been ignored or not substitute with current data key set.