Compare commits

..

1 Commits

Author SHA1 Message Date
taoufik 8a46a87b3e Fix missing openapi title, version and openapi_version and black 2019-12-03 19:38:12 +01:00
2 changed files with 6 additions and 7 deletions
+5 -4
View File
@@ -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,
+1 -3
View File
@@ -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 = (
{}