Skip to content

Commit 8f28b72

Browse files
committed
get document uri fo object
1 parent fc1ee83 commit 8f28b72

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

openapi-parser/src/main/java/io/openapiparser/Properties.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.openapiparser.support.Experimental;
1313
import org.checkerframework.checker.nullness.qual.Nullable;
1414

15+
import java.net.URI;
1516
import java.util.*;
1617

1718
import static io.openapiprocessor.jsonschema.support.Null.nonNull;
@@ -28,6 +29,16 @@ protected Properties (Context context, Bucket bucket) {
2829
this.bucket = bucket;
2930
}
3031

32+
/**
33+
* Retrieves the document URI of the document in which the current object is defined.
34+
*
35+
* @return the URI of the document
36+
*/
37+
@Experimental
38+
public URI getDocumentUri() {
39+
return bucket.getScope().getDocumentUri();
40+
}
41+
3142
/* json pointer */
3243

3344
@Experimental

0 commit comments

Comments
 (0)