Fork me on GitHub
replied to a thread:

This is an interesting question, not sure of how smart the swagger generator can be.

replied to a thread:

Not sure if this was answered yet.

(json-schema/transform [:or {:json-schema/type "string"} int? string?]  )
  ;; => {:anyOf [{:type "integer", :format "int64"} {:type "string"}],
  ;;     :type "string"}
Though in this case [:maybe string?] would be more precise than :or. But not sure if it works any better with SwaggerUI. :or generates anyOf json-schema, :maybe generates oneOf.

👍 2