def render(self, data, media_type=None, renderer_context=None):
    assert self.codec_class, 'must override codec_class'
    codec = self.codec_class(self.validators)
    if (not isinstance(data, Swagger)):
        return JSONRenderer().render(data, media_type, renderer_context)
    return codec.encode(data)
def render(self, data, media_type=None, renderer_context=None):
    assert self.codec_class, 'must override codec_class'
    codec = self.codec_class(self.validators)
    if (not isinstance(data, Swagger)):
        return JSONRenderer().render(data, media_type, renderer_context)
    return codec.encode(data)