Skip to content

Commit

Permalink
Fix use of wrong version in ResolveStringConstraints spec
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarmueller committed Sep 2, 2018
1 parent e5935f6 commit e2f2afa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ case class SchemaRefResolver

currentResolutionScope.collectFirst {
case id if absoluteRef.startsWith(id.value) => absoluteRef.drop(id.value.length)
}.map(remaining => {
}.map(remaining =>
resolve(
current,
Ref(if (remaining.startsWith("#")) remaining else "#" + remaining),
updatedScope
)
}
).getOrElse(resolveAbsolute(a, updatedScope))

case r@RelativeRef(_) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ResolveStringConstraintsSpec extends Specification {
"draft v7" should {

import Version7._
val resolver = SchemaRefResolver(Version4)
val resolver = SchemaRefResolver(Version7)

"resolve string constraints" in {
val schema =
Expand Down

0 comments on commit e2f2afa

Please sign in to comment.