Fork me on GitHub
#reitit
<
2023-10-12
>
Stig Brautaset15:10:40

Is it possible to only enforce request specs for some calls? (But still use return specs to generate OpenAPI docs?) I'm recommending we use Reitit for an internal project at work, where we're replacing a gRPC API. A concern we have is that as our service has evolved historical data might not be fully conformant with current specs.

Stig Brautaset16:10:49

Answering myself, as I'm wont to do... The TL;DR is “no”. There's a single https://github.com/metosin/reitit/blob/master/modules/reitit-malli/src/reitit/coercion/malli.cljc#L97-L98 option that affects both requests and responses.

Stig Brautaset16:10:51

Is there be any appetite for a PR to make that option settable separately for requests and responses? It looks like it should be relatively easy to change the code to do that in a backwards compatible way.

Stig Brautaset19:10:43

Kudos for making a very hackable codebase that is easy to contribute to! 🙂