Fork me on GitHub
#reitit
<
2018-10-31
>
Hannu Hartikainen07:10:21

CONTRIBUTING.md says you should run lein test but I started wondering if you should actually instead run ./scripts/test.sh clj and ./scripts/test.sh cljs. OTOH getting the Node.js environment working is untrivial for me right now.

ikitommi07:10:36

@hannu.hartikainen you are right, the CONTRIBUTING is based from other projects, the .circleci/config.yml has the scripts to install & run the tests. Would you like do a PR for the guide?

Hannu Hartikainen07:10:59

Will do, thanks for clarifying.

💯 4
valerauko14:10:38

i noticed this weird thing about swagger in 0.2.4

valerauko14:10:06

endpoints that have a body schema of vector? don't work with swagger

valerauko14:10:42

it gets converted to a type: array thing in swagger but array types require an items field

valerauko14:10:09

so basically it has to be a s/coll-of something

ikitommi14:10:13

@vale oh, might not be complete. As usual, PRs welcome

👍 4
valerauko14:10:35

would that be in reitit-swagger or some other lib?

ikitommi14:10:28

it's either spec-tools or schema-tools (like the openapi3 support would be).

ikitommi15:10:21

trying to keep theae libs separate to support reuse from other web libs too

👍 4
valerauko15:10:07

is there any way to log coercion errors?

valerauko16:10:26

request coercion for requests from an external service keeps failing but i have no way to see the response -- can these errors be logged somehow?

ikitommi17:10:49

@vale there is the exceptions middleware, that can be configured per exception type, just updated the guide: https://metosin.github.io/reitit/ring/default_middleware.html#exception-handling

ikitommi17:10:46

you can either define a custom exception handler for :reitit.coercion/request-coercion or :reitit.ring.middleware.exception/wrap to wrap all exceptions, e.g. log ’em all

👍 4
💯 4