renderers.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:drf-swagger-customization 作者: androiz 项目源码 文件源码
def render(self, data, accepted_media_type=None, renderer_context=None):
        if renderer_context['response'].status_code != status.HTTP_200_OK:
            return JSONRenderer().render(data)
        extra = self.get_customizations()
        swagger_doc = json.loads(OpenAPICodec().encode(data, extra=extra))
        result = append_schemas(swagger_doc)  # Append more information to documentation
        return result
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号