16 lines
395 B
Elixir
16 lines
395 B
Elixir
defmodule CustomerServiceWeb.Router do
|
|
use CustomerServiceWeb, :router
|
|
|
|
pipeline :api do
|
|
plug CORSPlug, origin: "*"
|
|
plug OpenApiSpex.Plug.PutApiSpec, module: CustomerServiceWeb.ApiSpec
|
|
end
|
|
|
|
scope "/api" do
|
|
pipe_through :api
|
|
|
|
resources "/customers", CustomerServiceWeb.Customer, only: [:create, :index, :show]
|
|
get "/openapi", OpenApiSpex.Plug.RenderSpec, []
|
|
end
|
|
end
|