openapi-core/openapi_core/contrib/flask/responses.py

23 lines
469 B
Python
Raw Normal View History

2019-10-19 11:01:50 +00:00
"""OpenAPI core contrib flask responses module"""
import re
from openapi_core.wrappers.base import BaseOpenAPIResponse
class FlaskOpenAPIResponse(BaseOpenAPIResponse):
def __init__(self, response):
self.response = response
@property
def data(self):
return self.response.data
@property
def status_code(self):
return self.response._status_code
@property
def mimetype(self):
return self.response.mimetype