Open bradjones1 opened 2 years ago
Sometimes schema files have more specific $ids than their well-known/canonical URLs. E.g.,
$id
https://jsonapi.org/schema vs. https://jsonapi.org/schemas/spec/v1.0/draft
https://jsonapi.org/schema
https://jsonapi.org/schemas/spec/v1.0/draft
I may be using a local file with that more specific/versioned $id, but other schemas will reference the canonical version. If I choose to explicitly set the ID in ::loadObjectSchema(), we should use that. Except, it's overridden at https://github.com/opis/json-schema/blob/c48df6d7089a45f01e1c82432348f2d5976f9bfb/src/Parsers/SchemaParser.php#L346-L349
::loadObjectSchema()
Sometimes schema files have more specific
$id
s than their well-known/canonical URLs. E.g.,https://jsonapi.org/schema
vs.https://jsonapi.org/schemas/spec/v1.0/draft
I may be using a local file with that more specific/versioned
$id
, but other schemas will reference the canonical version. If I choose to explicitly set the ID in::loadObjectSchema()
, we should use that. Except, it's overridden at https://github.com/opis/json-schema/blob/c48df6d7089a45f01e1c82432348f2d5976f9bfb/src/Parsers/SchemaParser.php#L346-L349