-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Check in, routes do not comply with http [skip ci] * Update routes to GET `@` endpoints * Bump to version 0.4.0
- Loading branch information
Jesus Bracho
authored
Mar 28, 2018
1 parent
ca77897
commit fbfc4b1
Showing
12 changed files
with
160 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule PlenarioWeb.Api.AotController do | ||
use PlenarioWeb, :api_controller | ||
|
||
def get(conn, _params) do | ||
render(conn, "get.json", %{}) | ||
end | ||
|
||
def head(conn, _params) do | ||
render(conn, "head.json", %{}) | ||
end | ||
|
||
def describe(conn, _params) do | ||
render(conn, "describe.json", %{}) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule PlenarioWeb.Api.DetailController do | ||
use PlenarioWeb, :api_controller | ||
|
||
def get(conn, _params) do | ||
render(conn, "get.json", %{}) | ||
end | ||
|
||
def head(conn, _params) do | ||
render(conn, "head.json", %{}) | ||
end | ||
|
||
def describe(conn, _params) do | ||
render(conn, "describe.json", %{}) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule PlenarioWeb.Api.ListController do | ||
use PlenarioWeb, :api_controller | ||
|
||
def get(conn, _params) do | ||
render(conn, "get.json", %{}) | ||
end | ||
|
||
def head(conn, _params) do | ||
render(conn, "head.json", %{}) | ||
end | ||
|
||
def describe(conn, _params) do | ||
render(conn, "describe.json", %{}) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule PlenarioWeb.Api.AotView do | ||
use PlenarioWeb, :api_view | ||
|
||
def render("get.json", _params) do | ||
%{} | ||
end | ||
|
||
def render("head.json", _params) do | ||
%{} | ||
end | ||
|
||
def render("describe.json", _params) do | ||
%{} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule PlenarioWeb.Api.DetailView do | ||
use PlenarioWeb, :api_view | ||
|
||
def render("get.json", _params) do | ||
%{} | ||
end | ||
|
||
def render("head.json", _params) do | ||
%{} | ||
end | ||
|
||
def render("describe.json", _params) do | ||
%{} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
defmodule PlenarioWeb.Api.ListView do | ||
use PlenarioWeb, :api_view | ||
|
||
def render("get.json", _params) do | ||
%{} | ||
end | ||
|
||
def render("head.json", _params) do | ||
%{} | ||
end | ||
|
||
def render("describe.json", _params) do | ||
%{} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule PlenarioWeb.Api.AotControllerTest do | ||
use PlenarioWeb.Testing.ConnCase | ||
|
||
test "GET /api/v2/aot", %{conn: conn} do | ||
conn = get(conn, "/api/v2/aot") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
|
||
test "GET /api/v2/aot/@head", %{conn: conn} do | ||
conn = get(conn, "/api/v2/aot/@head") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
|
||
test "GET /api/v2/aot/@describe", %{conn: conn} do | ||
conn = get(conn, "/api/v2/aot/@describe") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
test/plenario_web/controllers/api/detail_controller_test.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule PlenarioWeb.Api.DetailControllerTest do | ||
use PlenarioWeb.Testing.ConnCase | ||
|
||
test "GET /api/v2/detail", %{conn: conn} do | ||
conn = get(conn, "/api/v2/detail") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
|
||
test "GET /api/v2/detail/@head", %{conn: conn} do | ||
conn = get(conn, "/api/v2/detail/@head") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
|
||
test "GET /api/v2/detail/@describe", %{conn: conn} do | ||
conn = get(conn, "/api/v2/detail/@describe") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
end |
18 changes: 18 additions & 0 deletions
18
test/plenario_web/controllers/api/list_controller_test.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule PlenarioWeb.Api.ListControllerTest do | ||
use PlenarioWeb.Testing.ConnCase | ||
|
||
test "GET /api/v2/data-sets", %{conn: conn} do | ||
conn = get(conn, "/api/v2/data-sets") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
|
||
test "GET /api/v2/data-sets/@head", %{conn: conn} do | ||
conn = get(conn, "/api/v2/data-sets") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
|
||
test "GET /api/v2/data-sets/@describe", %{conn: conn} do | ||
conn = get(conn, "/api/v2/data-sets") | ||
assert json_response(conn, 200) == %{} | ||
end | ||
end |