WIP
This commit is contained in:
15
lib/customer_service_web/router.ex
Normal file
15
lib/customer_service_web/router.ex
Normal file
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user