This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-29
Channels
- # beginners (1)
- # cider (7)
- # cljsrn (6)
- # clojars (3)
- # clojure (35)
- # clojure-nl (2)
- # clojure-spec (5)
- # clojure-uk (9)
- # clojurescript (18)
- # clojurex (1)
- # community-development (2)
- # cursive (27)
- # datomic (12)
- # duct (11)
- # emacs (5)
- # hoplon (5)
- # immutant (2)
- # leiningen (1)
- # luminus (15)
- # nyc (1)
- # om (9)
- # om-next (5)
- # onyx (55)
- # parinfer (1)
- # re-frame (3)
- # reagent (44)
- # reitit (11)
- # ring-swagger (4)
- # shadow-cljs (25)
- # videos (1)
Anyone had issues rendering the swagger-ui on non-localhost? Everything was working perfectly on my laptop, I deployed it to my server and now all of the CSS is broken. The actual API seems to be working, but I’m also getting a small error button that is the results from
validating my api:
{"messages":["attribute paths.'/api/v1/groups/list'(get).return is unexpected","attribute paths.'/api/v1/groups/kids'(get).return is unexpected","attribute paths.'/api/v1/kids/lookup'(get).return is unexpected"],"schemaValidationMessages":[{"level":"error","domain":"validation","keyword":"additionalProperties","message":"object instance has properties which are not allowed by the schema: [\"return\"]","schema":{"loadingURI":"","pointer":"/definitions/operation"},"instance":{"pointer":"/paths/~1api~1v1~1groups~1kids/get"}}]}
I got the validation error to go away by passing this flag: :options {:ui {:validatorUrl nil}}
, but the CSS is still screwed up. 😕
So I fixed the CSS error by upgrading to the latest ring-swagger-ui
. Unfortunately, now the authorization token isn’t being passed in anymore.