oliyh / martian

The HTTP abstraction library for Clojure/script, supporting OpenAPI, Swagger, Schema, re-frame and more
MIT License
526 stars 45 forks source link

Add openapi->handlers functionality #90

Closed czan closed 3 years ago

czan commented 3 years ago

I'm keen to use Martian for a project at work, but the specs that I have to interact with are OpenAPI3 rather than Swagger2. I tried using a converted from OpenAPI to Swagger, but they ended up yielding sub-par schemas (lots of optional keys and maybes that didn't match required fields in the spec).

In order to make Martian fit our project better, I've put together this martian.openapi namespace. I'm not claiming that it's a full implementation of the spec, and in particular the "content types" thing was a bit hastily thrown together, but this seems to be sufficient for what I need, and I figured it might be helpful for someone else, too.

I took inspiration from the martian.swagger namespace, but no code is shared with it.

czan commented 3 years ago

Presumably if this ends up merged it would resolve #51.

oliyh commented 3 years ago

Hi,

Thank you! This looks great, #51 has been outstanding for ages. I will take a close look in a bit.

Cheers