diff --git a/responder/api.py b/responder/api.py index aca5b74..2fbd314 100644 --- a/responder/api.py +++ b/responder/api.py @@ -44,12 +44,13 @@ class API: *, debug=False, title=None, - version=None, + version="1.0", description=None, terms_of_service=None, contact=None, license=None, openapi=None, + openapi_version="3.0.2", openapi_route="/schema.yml", static_dir="static", static_route="/static", @@ -117,9 +118,9 @@ class API: if openapi or docs_route: self.openapi = OpenAPISchema( app=self, - title="Web Service", - version="1.0", - openapi="3.0.2", + title=title, + version=version, + openapi=openapi_version, docs_route=docs_route, description=description, terms_of_service=terms_of_service, diff --git a/responder/models.py b/responder/models.py index d39f318..ca8ed63 100644 --- a/responder/models.py +++ b/responder/models.py @@ -283,9 +283,7 @@ class Response: self.content = None #: A bytes representation of the response body. self.mimetype = None self.encoding = DEFAULT_ENCODING - self.media = ( - None - ) #: A Python object that will be content-negotiated and sent back to the client. Typically, in JSON formatting. + self.media = None #: A Python object that will be content-negotiated and sent back to the client. Typically, in JSON formatting. self._stream = None self.headers = ( {}