openapi-core/openapi_core/contrib/flask/responses.py
2019-10-19 12:01:57 +01:00

22 lines
469 B
Python

"""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