Fork me on GitHub
#malli
<
2021-01-28
>
danielneal12:01:12

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

juhoteperi15:01:23

Not sure about Swagger 3, malli.swagger might be do Swagger 2, but not sure if there is difference in this level. It is just JSON Schema with a few extensions.

danielneal16:01:30

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

danielneal16:01:38

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

danielneal16:01:19

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

juhoteperi16:01:01

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

juhoteperi16:01:46

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

danielneal17:01:49

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

ikitommi13:01:43

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

ikitommi13:01:19

who would like to contribute those?

danielneal13:01:24

haha great timing

danielneal13:01:00

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

danielneal13:01:19

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

👍 3
ikitommi15:01:51

this is going to be so good.

juhoteperi15:01:23

Not sure about Swagger 3, malli.swagger might be do Swagger 2, but not sure if there is difference in this level. It is just JSON Schema with a few extensions.