-
Notifications
You must be signed in to change notification settings - Fork 150
Undocumented routes when importing from different source file. #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hi. currently you can't do that. The swagger-docs (and reverse-route lookup-table) are generated at compile-time, not at runtime. So, currently, to get the swagger-docs out from extra routes, you need to define the extra routes as a Var, defined by This is not good and a source of confusion, so the plan is to move all swagger-resolution from compile-time to run-time. Also gives other benefits like better support for Liberator & snappier dev-flow. Plan is to get this out before the end of the year. Before that, you should use hope this helps. |
see #178 |
Hi! Good to know that this feature is in compojure-api's roadmap! Meanwhile, I will group my routes in one file because I want to keep my endpoint as system components. The defroutes* macro without a function enclosing it to inject dependencies is not compatible with what I want. Thanks for your quick answer! |
Working on this via #178 (comment). |
this works on internal 1.0.0-SNAPSHOT. |
Merged in master. We will try to finalize 1.0.0 this/next week. See Changelog for details. |
I am trying to organice my routes in separated files by their type/task (contacts, users, items, etc.) and then importing all of them in one main file in which I have configured the swagger documentation. However, all routes that have been imported from other files aren't being considered by swagger.
This is a extract of my main route table (swagger configuration belongs here):
And my contacts routes files looks like this:
You can see here that my configuration only shows me the dummy route and not the ones that I imported from the other file.

I am sure that those external routes are working because I can request them without problems. Any idea of what could be wrong in my configuration?
The text was updated successfully, but these errors were encountered: