reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Matheus Moreira 2021-03-09T13:54:03.009Z

Hello! When using reitit + malli (coercion) + Swagger integration, is there a way to tell Swagger what is the type of a certain schema attribute? I used to have models with optional attributes defined like [:map [:attribute {:optional true} string?]] and that showed as expected on the Swagger ui (i.e. attribute is not required and has type string). But I had to change the attribute definition to [:map [:attribute [:or nil? string?]]] and now the attribute type is not showed as string anymore on Swagger ui. Is there a way to say what type should appear on the ui, something like [:map [:attribute {:type string} [:or nil? string?]]]?

juhoteperi 2021-03-10T17:06:05.057400Z

Any properties from schema options with json-schema namespaces are lifted to the resulting json-schema, and override the automatic properties.

Matheus Moreira 2021-03-11T09:45:45.058400Z

@juhoteperi What is the practical difference between oneOf and anyOf ?

juhoteperi 2021-03-11T09:47:44.058800Z

In this case, probably nothing