This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-13
Channels
- # announcements (15)
- # babashka (48)
- # beginners (5)
- # biff (4)
- # calva (3)
- # cider (10)
- # clerk (16)
- # clj-kondo (6)
- # cljdoc (20)
- # cljs-dev (13)
- # clojure (117)
- # clojure-argentina (1)
- # clojure-brasil (5)
- # clojure-europe (40)
- # clojure-nl (1)
- # clojure-norway (111)
- # clojure-uk (5)
- # clojurescript (16)
- # cursive (20)
- # datascript (2)
- # datomic (106)
- # etaoin (2)
- # events (3)
- # funcool (1)
- # graphql (1)
- # helix (8)
- # hyperfiddle (36)
- # leiningen (12)
- # matrix (1)
- # nrepl (1)
- # off-topic (61)
- # other-languages (10)
- # polylith (22)
- # practicalli (1)
- # reagent (28)
- # reitit (11)
- # remote-jobs (3)
- # ring (12)
- # shadow-cljs (109)
- # slack-help (6)
- # solo-full-stack (23)
- # squint (7)
- # xtdb (11)
Hello, I tried the code from this blog post: https://www.metosin.fi/blog/openapi3, and it worked fine. However, when I attempted to use the Martian library to get the result, I always received an empty array ([]). What did I do wrong?
(try
(let [m (martian-http/bootstrap-openapi "")]
(martian/explore m))
(catch Exception e
(println "Caught exception: " (.getMessage e))))
I believe that you need to add :operationId
to the swagger map in the route data. I stumbled over that the other day:
https://github.com/oliyh/martian#caveats
Ok, I found in the documentation: operationId is an optional unique string used to identify an operation. If provided, these IDs must be unique among all operations described in your API.
That is worked for me. BUT now I fight with `Execution error (MalformedURLException) at http://java.net.URL/<init> (URL.java:593). no protocol:` …
I know what is the problem, but I don’t how to modify the openapi config.. I tried add base-url, server (uri) but nothing happens. The problem is here (response of martian/request-for
). The protocol/domain part totally missing. If I add this part.. test manually > works. Any idea?
{:method :get,
:url "{{MISSING URL PART}}/v1/scramble",
:query-params ...,
:as :text,
:headers {"Accept" "application/json"}}