diff --git a/gns3server/web/documentation.py b/gns3server/web/documentation.py index 04b5cfd3..6b15b7e0 100644 --- a/gns3server/web/documentation.py +++ b/gns3server/web/documentation.py @@ -85,7 +85,7 @@ class Documentation(object): self._write_json_schema(f, schema['definitions'][definition]) f.write("Body\n+++++++++\n") - def _write_json_schema_object(self, f, obj, schema): + def _write_json_schema_object(self, f, obj): """ obj is current object in JSON schema schema is the whole schema including definitions @@ -126,7 +126,7 @@ class Documentation(object): Type \ Description \ \n") - self._write_json_schema_object(f, schema, schema) + self._write_json_schema_object(f, schema) f.write(" \n\n") diff --git a/gns3server/web/response.py b/gns3server/web/response.py index e252b0b6..eff5b165 100644 --- a/gns3server/web/response.py +++ b/gns3server/web/response.py @@ -44,15 +44,13 @@ class Response(aiohttp.web.Response): log.debug(data) return super().write(data) - """ - Set the response content type to application/json and serialize - the content. - - :param anwser The response as a Python object - """ - def json(self, answer): - """Pass a Python object and return a JSON as answer""" + """ + Set the response content type to application/json and serialize + the content. + + :param anwser The response as a Python object + """ self.content_type = "application/json" if hasattr(answer, '__json__'):