Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lazy val scala2 = "2.13.16"
lazy val scala3 = "3.4.2"
lazy val scala3 = "3.8.4"
lazy val supportedScalaVersions = List(scala2, scala3)

name := "apibuilder-validation"
Expand All @@ -10,7 +10,7 @@ ThisBuild / scalaVersion := scala3

lazy val allScalacOptions = Seq(
"-feature",
"-Xfatal-warnings",
"-Werror",
"-Wconf:src=generated/.*:silent",
"-deprecation"
)
Expand All @@ -29,7 +29,7 @@ lazy val root = project
"com.github.apicollective" % "apibuilder-commons" % (if (scalaVersion.value.startsWith("3")) "0.1.0" else "0.0.6"),
"com.typesafe.play" %% "play-json" % (if (scalaVersion.value.startsWith("3")) "2.10.6" else "2.9.4"),
"com.typesafe.play" %% "play-json-joda" % (if (scalaVersion.value.startsWith("3")) "2.10.6" else "2.9.4"),
"org.apache.commons" % "commons-compress" % "1.26.2",
"org.apache.commons" % "commons-compress" % "1.28.0",
"org.typelevel" %% "cats-core" % "2.12.0",
"org.scalatest" %% "scalatest" % "3.2.19" % Test,
),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sbt.version=1.10.0
sbt.version=1.12.11


Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.apibuilder.validation.util

import java.io.{BufferedInputStream, InputStream}
import java.net.URL
import java.net.{URI, URL}

import cats.data.ValidatedNec
import cats.implicits._
Expand All @@ -11,7 +11,7 @@ import scala.util.{Failure, Success, Try}
object ValidatedUrlDownloader {
def validateUrl(url: String): ValidatedNec[String, URL] = {
Try {
new URL(url)
new URI(url).toURL
} match {
case Success(u) => u.validNec
case Failure(ex) => s"Invalid URL: ${ex.getMessage}".invalidNec
Expand Down
Loading