diff --git a/README.md b/README.md index 9a5e6b1..c3de24d 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ The current version of this API is **v1**. All data is sent and received as **JSON**. ### Root endpoint -The root endpoint is: `http://:/pitaya-finch/api/v1/` +The root endpoint is: `http://:/pitaya/api/v1/` ## NLP diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 501293a..6a8e2e6 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -1,8 +1,8 @@ # server server { context = "pitaya" - port: 8080 - port: ${?PORT} + port = 8080 + port = ${?PORT} } api { diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/EndpointsTest.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/EndpointsTest.scala index c01234d..fae6d87 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/EndpointsTest.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/EndpointsTest.scala @@ -6,7 +6,7 @@ import com.twitter.util.Promise import org.juanitodread.pitayafinch.UnitSpec class EndpointsTest extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1" + private val baseApi = "/pitaya/api/v1" private val endpoints = List( s"$baseApi", s"$baseApi/help", diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/IndexTest.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/IndexTest.scala index 5182bdc..ece9078 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/IndexTest.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/IndexTest.scala @@ -5,7 +5,7 @@ import io.finch._ import org.juanitodread.pitayafinch.UnitSpec class IndexTest extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1" + private val baseApi = "/pitaya/api/v1" "An Index route" should "have an index endpoint" in { assert(Index.index.apply( diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/UserTest.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/UserTest.scala index 6c1877b..3af284b 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/UserTest.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/UserTest.scala @@ -6,7 +6,7 @@ import org.juanitodread.pitayafinch.UnitSpec import org.juanitodread.pitayafinch.model.CommonMessage class UserTest extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1/users" + private val baseApi = "/pitaya/api/v1/users" "A User route" should "have an index endpoint" in { assert(User.index.apply( diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/cookbook/UsersTest.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/cookbook/UsersTest.scala index 6ecc9dd..36f5396 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/cookbook/UsersTest.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/cookbook/UsersTest.scala @@ -11,7 +11,7 @@ import org.juanitodread.pitayafinch.UnitSpec import org.juanitodread.pitayafinch.model.{ User => UserModel } class UsersTest extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1/crud/users" + private val baseApi = "/pitaya/api/v1/crud/users" def prepareUsers(): List[UserModel] = { val usersFixture = List( diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/NormalizerEndpointSpec.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/NormalizerEndpointSpec.scala index e54a4a8..b2ed002 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/NormalizerEndpointSpec.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/NormalizerEndpointSpec.scala @@ -9,7 +9,7 @@ import org.juanitodread.pitayafinch.UnitSpec import org.juanitodread.pitayafinch.model.nlp.tokenizer._ class NormalizerEndpointSpec extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1/nlp/normalizer" + private val baseApi = "/pitaya/api/v1/nlp/normalizer" "A NormalizerEndpoint route" should "have lowercase endpoint" in { val request = LowerCaseRequest(List("This", "SHOULD", "bE", "lOwErcASE")) diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/PipelineEndpointSpec.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/PipelineEndpointSpec.scala index c6a6c3e..6a8ad76 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/PipelineEndpointSpec.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/PipelineEndpointSpec.scala @@ -9,7 +9,7 @@ import org.juanitodread.pitayafinch.UnitSpec import org.juanitodread.pitayafinch.model.nlp.tokenizer._ class PipelineEndpointSpec extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1/nlp/pipeline" + private val baseApi = "/pitaya/api/v1/nlp/pipeline" "A PipelineEndpoint route" should "have pipeline endpoint" in { val request = PipelineRequest( diff --git a/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/TokenizerEndpointSpec.scala b/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/TokenizerEndpointSpec.scala index 09bf327..cf0571c 100644 --- a/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/TokenizerEndpointSpec.scala +++ b/src/test/scala/org/juanitodread/pitayafinch/routes/nlp/tools/tokenize/TokenizerEndpointSpec.scala @@ -13,7 +13,7 @@ import org.juanitodread.pitayafinch.model.nlp.tokenizer.{ } class TokenizerEndpointSpec extends UnitSpec { - private val baseApi = "/pitaya-finch/api/v1/nlp/tokenizer" + private val baseApi = "/pitaya/api/v1/nlp/tokenizer" "A TokenizerEndpoint route" should "have getAlgorithms endpoint" in { TokenizerEndpoint.getAlgorithms().apply(Input.get(baseApi)).awaitValueUnsafe().get should equal {