mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-25 19:19:55 +00:00
15 lines
387 B
Python
15 lines
387 B
Python
"""OpenAPI core contrib flask responses module"""
|
|
import re
|
|
|
|
from openapi_core.validation.response.datatypes import OpenAPIResponse
|
|
|
|
|
|
class FlaskOpenAPIResponseFactory(object):
|
|
|
|
@classmethod
|
|
def create(cls, response):
|
|
return OpenAPIResponse(
|
|
data=response.data,
|
|
status_code=response._status_code,
|
|
mimetype=response.mimetype,
|
|
)
|