Fork me on GitHub
#ring-swagger
<
2018-06-26
>
ikitommi16:06:49

[metosin/compojure-api "2.0.0-alpha21"] is out. Biggest change is the new Muuntaja version, with Jsonista as the default JSON formatter + supports NIO + a multi-module layout: https://github.com/metosin/compojure-api/blob/master/CHANGELOG.md#200-alpha21-2018-06-26

ikitommi16:06:17

the 1. =&gt; 2. migration guide is also updated.

Andreasp199418:06:41

Hey is it possible to have multiple 200 responses in the swagger docs with different schema??

ikitommi18:06:28

I don't think swagger supports it.

Andreasp199418:06:46

Is it possible to make a schema then that has optional fields?

ikitommi18:06:01

That is possible. OpenAPI3 (next version of swagger) would support oneOf and anyOf. Schema supports these kind of things already.

ikitommi18:06:30

Hmm... maybe there was a discriminator key in swagger too, please read the spec if you are interested. The swagger-ui doesn't anyway show those.

Andreasp199418:06:09

Alright I will check them out! Thanks for the help! 🙂