We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca45f15 commit fcd0248Copy full SHA for fcd0248
src/commonMain/kotlin/io/github/optimumcode/json/schema/internal/SchemaLoader.kt
@@ -610,6 +610,11 @@ private data class DefaultLoadingContext(
610
id.isAbsolute -> register(id.buildRefId(), assertion, dynamic) // register JSON schema by absolute URI
611
id.isRelative ->
612
when {
613
+ // For root schema we should not apply any transformations to ID
614
+ schemaPath === JsonPointer.ROOT && !id.path.isNullOrBlank() ->
615
+ // Empty URI is used to normalize the path
616
+ // Instead of 'path/segment' it will result '/path/segment
617
+ register(Uri.EMPTY.appendPathToParent(id.path!!).buildRefId(), assertion, dynamic)
618
!id.path.isNullOrBlank() ->
619
register(
620
// register JSON schema by related path
0 commit comments