Fork me on GitHub
#ring-swagger
<
2018-04-29
>
seantempesta15:04:10

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"}}]}

seantempesta16:04:44

I got the validation error to go away by passing this flag: :options {:ui {:validatorUrl nil}}, but the CSS is still screwed up. 😕

seantempesta17:04:27

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.

ikitommi18:04:06

the old swagger-ui is IMO much better than the 3.*. Haven’t seen any css-errors with that. hmm.