openapi-core/openapi_core/schema/responses/models.py

16 lines
480 B
Python
Raw Normal View History

2018-04-17 12:18:40 +00:00
"""OpenAPI core responses models module"""
class Response(object):
def __init__(
self, http_status, description, headers=None, content=None,
2020-03-03 13:01:45 +00:00
links=None, extensions=None):
2018-04-17 12:18:40 +00:00
self.http_status = http_status
self.description = description
self.headers = headers and dict(headers) or {}
2021-03-30 11:29:37 +00:00
self.content = content
2018-04-17 12:18:40 +00:00
self.links = links and dict(links) or {}
2020-03-03 13:01:45 +00:00
self.extensions = extensions and dict(extensions) or {}