-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
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
Support for schemas as map values #53
Comments
Define the schemas using |
Though I think this should still work with the plain Looking at the code, I think there might be problem with handing non-named schemas with predicates like |
Sorry it took so long to fix, should work now with named schemas (in (defschema Boundary
{:type (enum "MultiPolygon" "Polygon" "MultiPoint" "Point")
:coordinates [Any]})
(defschema ReturnValue
{:boundary (maybe Boundary)}) tests here https://github.com/metosin/ring-swagger/blob/master/test/ring/swagger/core_test.clj#L171 does not work with anonymous schemas (https://github.com/metosin/ring-swagger/blob/master/test/ring/swagger/core_test.clj#L341), will try to fix that later cheers, Tommi |
Fixed now, by @Deraen. Will wrap the sub-walker as a separate lib so that it can be extended easier. |
I'm having some difficulty integrating a schema map using
maybe
in the map value. Here is the schema definition for the data that my API returns :Here is the exception I'm running into when starting my server :
I'm using
[metosin/compojure-api "0.16.2"]
. I'm not quite sure what I'm missing here. Any pointers as to how I can get around this? Do I need to define a customjson-schema
?The text was updated successfully, but these errors were encountered: