@@ -86,7 +86,7 @@ sub traverse ($self, $evaluator, $config_override = {}) {
8686
8787 my $schema = $self -> schema;
8888 my $state = {
89- initial_schema_uri => $self -> canonical_uri,
89+ # initial_schema_uri calculated from ' $self' below
9090 traversed_schema_path => ' ' ,
9191 schema_path => ' ' ,
9292 data_path => ' ' ,
@@ -138,6 +138,9 @@ sub traverse ($self, $evaluator, $config_override = {}) {
138138 return $state ;
139139 }
140140
141+ # in v3.2, we will use the resolved form of the uri in '$self'
142+ $self -> _set_canonical_uri($state -> {initial_schema_uri } = $self -> original_uri);
143+
141144 # /jsonSchemaDialect: https://spec.openapis.org/oas/v3.1#specifying-schema-dialects
142145 {
143146 my $json_schema_dialect = $self -> json_schema_dialect // $schema -> {jsonSchemaDialect };
@@ -478,6 +481,8 @@ This is the identifier that the document is known by, which is used to resolve a
478481keywords in the document (unless overridden by a subsequent C<$id > in a schema).
479482See L<§4.6/https://spec.openapis.org/oas/v3.1.1#relative-references-in-api-description-uris> .
480483
484+ See also L</retrieval_uri> .
485+
481486=head2 metaschema_uri
482487
483488The URI of the schema that describes the OpenAPI document itself. Defaults to
@@ -505,6 +510,14 @@ longer be assumed.
505510
506511This class inherits all methods from L<JSON::Schema::Modern::Document> . In addition:
507512
513+ =head2 retrieval_uri
514+
515+ Also available as L<JSON::Schema::Modern::Document/original_uri> , this is known as the "retrieval
516+ URI" in the OAS specification: the URL the document was originally sourced from, or the URI that
517+ was used to add the document to the L<OpenAPI::Modern> instance.
518+
519+ In OpenAPI version 3.1.x, this is the same as L</canonical_uri> .
520+
508521=head2 get_operationId_path
509522
510523Returns the json pointer location of the operation containing the provided C<operationId > (suitable
0 commit comments