Fork me on GitHub
#ring-swagger
<
2017-09-19
>
ikitommi04:09:51

@bja that’s totally valid. Some people run the middleware-stack on AWS Lambda for example (https://github.com/mhjort/ring-apigw-lambda-proxy).

sammikko10:09:09

hi.. i have my custom schema type Attribute, tried the class-based dispatch like this (defmethod json-schema/convert-class Attribute [val options] ... ) but it wasn't recognized .. I get the "don't know how to convert" error ... Does that seem right? Attribute is "implementing" Schema protocol

sammikko10:09:31

I haven't used multimethods before, so I thought I'd give it a try..

ikitommi10:09:15

the multimethod is only used if the type is presented as Class, e.g. java.lang.String. If your Attribute is a instance of a class, you can use the JsonSchema protocol for the mapping.

sammikko11:09:58

right thanks.. protocol-based works ok.. i thought (defprotocol Attribute ...) creates a java class i could use with multimethods