We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, thanks for this project which definitely is awesome! I've stumbled across this behaviour which one might counter-intuitive:
One can't describe a map attribute like this:
(malli.swagger/transform [:map [:my-uuid {:optional true :swagger/example #uuid"eb4acd14-5321-4317-82e2-5895269f18a8" :swagger/description "your most awesome uuid"} uuid?]]) ;; => {:type "object", :properties {:my-uuid {:type "string", :format "uuid"}}, :required []}
:optional is taken into account but :swagger/* keywords are ignored. As a result one has to follow this syntax with two attribute maps:
:optional
:swagger/*
(malli.swagger/transform [:map [:my-uuid {:optional true} [:and {:swagger/example #uuid"eb4acd14-5321-4317-82e2-5895269f18a8" :swagger/description "your most awesome uuid"} uuid?]]]) ;; => {:type "object", :properties {:my-uuid {:type "string", :format "uuid", :x-allOf [{:type "string", :format "uuid"}], :example #uuid"eb4acd14-5321-4317-82e2-5895269f18a8", :description "your most awesome uuid"}}, :required []}
For the sake of completion, this following syntax doesn't produce the expected result either as :optional now is ignored:
(malli.swagger/transform [:map [:my-uuid [:and {:optional true :swagger/example #uuid"eb4acd14-5321-4317-82e2-5895269f18a8" :swagger/description "your most awesome uuid"} uuid?]]]) ;; => {:type "object", :properties {:my-uuid {:type "string", :format "uuid", :x-allOf [{:type "string", :format "uuid"}], :example #uuid"eb4acd14-5321-4317-82e2-5895269f18a8", :description "your most awesome uuid"}}, :required [:my-uuid]}
Would you agree with me to qualify this as a bug? would you be interested in fixing it, or open to pull requests about that?
Using version "0.4.2"
"0.4.2"
Cheers!
The text was updated successfully, but these errors were encountered:
Thanks for reporting, this is duplicate to #86. Need to figure out a clean solution for this, options being:
m/form
m/properties
ideas welcome how to resolve this elegantly.
Sorry, something went wrong.
No branches or pull requests
Hi, thanks for this project which definitely is awesome! I've stumbled across this behaviour which one might counter-intuitive:
One can't describe a map attribute like this:
:optional
is taken into account but:swagger/*
keywords are ignored. As a result one has to follow this syntax with two attribute maps:For the sake of completion, this following syntax doesn't produce the expected result either as
:optional
now is ignored:Would you agree with me to qualify this as a bug? would you be interested in fixing it, or open to pull requests about that?
Using version
"0.4.2"
Cheers!
The text was updated successfully, but these errors were encountered: