I can’t find any specific documentation that lists all the meta-data that you can explicitly provide when creating an endpoint. The best that I can find is this snippet https://github.com/metosin/compojure-api/wiki/Swagger-integration#just-data We aren’t using Schema or Spec for validation but still want to document the application routes with Swagger and are using compojure-api
@sooheon Tested and your initial code seemwork ok (2.0.0-alpha23)
@rbarker there is (<http://compojure.api.help/help|compojure.api.help/help>)
for the repl.
but, if you only need swagger, you can use :swagger
for everything.
(GET "/api" []
:swagger {:description "endpoint", :responses {200 ...}}
(ok)
is there a list of everything that you can put in that map for the :swagger key?
anything that can be set via swagger, here’s the spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
there is a sample in ring-swagger too: https://github.com/metosin/ring-swagger#more-complete-example
the :parameters
and :responses
can use Schema (or Spec) definitions instead of JSON Schema definitions.
sorry, no guide. happy to see a PR of an example c-api app with just swagger docs.