freewebwithme

freewebwithme

Doesn't pickup nested routes in SwaggerUI (OpenApiSpex)

I have nested routes in router.ex file but It doesn’t show up in localhost:4000/swaggerui
I couldn’t figure out why this happens.

campaign_path  POST    /api/posts/preview                                                        DashboardApiWeb.Posts.PostController :send_post_preview
                        post_path  GET     /api/posts                                                                DashboardApiWeb.Posts.PostController :index
                        post_path  GET     /api/posts/:id                                                            DashboardApiWeb.Posts.PostController :show
                        post_path  POST    /api/posts                                                                DashboardApiWeb.Posts.PostController :create
                       post_path  PATCH   /api/posts/:id                                                            DashboardApiWeb.Posts.PostController :update
                                       PUT     /api/posts/:id                                                            DashboardApiWeb.Posts.PostController :update
                        post_path  DELETE  /api/posts/:id                                                            DashboardApiWeb.Posts.PostController :delete
       post_post_contact_path  POST    /api/posts/:post_id/posts_contacts                                DashboardApiWeb.Posts.PostContactController :filter
               post_post_path  POST    /api/posts/:post_id/duplicate                                         DashboardApiWeb.Posts.PostController :duplicate
       post_post_trigger_path  POST    /api/posts/:post_id/post_trigger/trigger                          DashboardApiWeb.Posts.PostTriggerController :create
       post_post_trigger_path  PATCH   /api/posts/:post_id/post_trigger/trigger/:id                      DashboardApiWeb.Posts.PostTriggerController :update
                                       PUT     /api/posts/:post_id/post_trigger/trigger/:id                      DashboardApiWeb.Posts.PostTriggerController :update
       post_post_trigger_path  DELETE  /api/posts/:post_id/post_trigger/trigger/:id                      DashboardApiWeb.Posts.PostTriggerController :delete
                        post_path  GET     /api/posts/contact/:contact_id                                            DashboardApiWeb.Posts.PostController :list_contact_posts
                        post_path  POST    /api/posts/messages_count                                                 DashboardApiWeb.Posts.PostController :messages_count
                        post_path  POST    /api/posts/audience       

This is output from mix phx.routes

and in localhost:4000/swaggerui I am looking for trigger endpoint

post_post_trigger_path  POST    /api/posts/:post_id/post_trigger/trigger                         DashboardApiWeb.Posts.PostTriggerController :create
post_post_trigger_path  PATCH   /api/posts/:post_id/post_trigger/trigger/:id                      DashboardApiWeb.Posts.PostTriggerController :update
post_post_trigger_path  DELETE  /api/posts/:post_id/post_trigger/trigger/:id                      DashboardApiWeb.Posts.PostTriggerController :delete

I am using OpeApiSpex
Any advices? or hints?

First Post!

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Can you show your code for this?

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement