malli

https://github.com/metosin/malli :malli:
danielneal 2021-01-28T12:50:12.024100Z

Is there a way of converting malli definitions to swagger 3 format?

ikitommi 2021-01-28T13:00:43.025300Z

Just chatted with @juhoteperi on Metosin internal about that. should be, not atm. should be a thin layer on top of malli.json-schema.

ikitommi 2021-01-28T13:01:19.025900Z

who would like to contribute those?

danielneal 2021-01-28T13:12:24.026200Z

haha great timing

danielneal 2021-01-28T13:39:00.026600Z

ah oh you mean you chatted with him after my comment 🙂

danielneal 2021-01-28T13:39:19.027100Z

I could have a look at it I guess, but swagger and malli are both completely new to me

👍 1
ikitommi 2021-01-28T13:40:18.027500Z

Just = yesterday. https://github.com/metosin/malli/pull/354

ikitommi 2021-01-28T15:10:51.028100Z

this is going to be so good.

ikitommi 2021-01-28T15:11:44.028200Z

danielneal 2021-01-28T16:51:30.029Z

I've been reading the swagger specification and it's massive

danielneal 2021-01-28T16:51:41.029200Z

https://swagger.io/specification/

danielneal 2021-01-28T16:53:38.029500Z

The most obvious difference is that in JSON Schema and Swagger 2, there is a "definitions" key for common objects, whereas this doesn't exist in OpenAPI 3

danielneal 2021-01-28T16:54:19.029700Z

I think it's replaced by the components object, or the schemas property on the components object

juhoteperi 2021-01-28T16:56:01.029900Z

With currently implementation, Malli only handles the schema -> properties part. Reitit/Ring-swagger/Compojure-api does the higher level Swagger2 generation.

juhoteperi 2021-01-28T16:57:46.030100Z

The properties part (JSON Schema) probably doesn't change much if at all between Swagger2 / OpenAPI 3.

danielneal 2021-01-28T17:07:49.030300Z

do you know if there are plans to support OpenAPI 3 in reitit?

danielneal 2021-01-28T17:08:12.030500Z

ah yeah, there's an open issue https://github.com/metosin/reitit/issues/84