-
Notifications
You must be signed in to change notification settings - Fork 149
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
[Question] how to mix and match Compojure Routes and static resources in defapi #48
Comments
Hi. You need a leading (defapi router
static
(swagger-ui "/swagger")
(swagger-docs :title "Longitude api")
(swaggered "api" :description "Longitude User who is an Organization (not a Person)"
(context "/api" []
(GET* "/org" [] (ok {})))) |
That fixed the resource handler, but now I get a new error: (defapi router
static
(swagger-ui "/swagger")
(swagger-docs :title "Longitude api" )
(swaggered "api" :description "Longitude User"
(context "/api" []
(GET* "/org" []
:summary "Dummy lookup"
:return [{:created Boolean}]
(ok {:created true})) Error: Thoughts? |
The return values are also validated against the There is a good set of samples at https://github.com/metosin/compojure-api/blob/master/examples/src/examples/thingie.clj. |
Thanks for your inputs. I've reverted my code to plain Compojure/Liberator for now and will revisit Schema in the future. |
How do you change the default context of
swagger-ui
(default is "/") and include a static resource handler under the same?The following, for example, doesn't work:
I also tried to include
compojure.api.middleware.public-resource-routes
underdefapi
, but no success.The text was updated successfully, but these errors were encountered: