def _operation(introspector): operation = OrderedDict( tags=introspector.tags, summary=introspector.parser.get_summary(), description=introspector.parser.get_description(), parameters=introspector.parameters, responses=introspector.responses, security=introspector.security) # Remove empty keys for key, value in list(operation.items()): if not value: operation.pop(key) return operation
def get_operation(self): """ Get full swagger operation object :return: swagger operation object :rtype: OrderedDict """ operation = OrderedDict(tags=self.parser.get_tags(), summary=self.parser.get_summary(), description=self.parser.get_description(), parameters=self.parameters, produces=None, consumes=None, responses=self.responses, security=self.security) for key, value in list(operation.items()): # Remove empty keys if not value: operation.pop(key) return operation
def get_operation(self): """ Get full swagger operation object :return: swagger operation object :rtype: OrderedDict """ operation = OrderedDict(tags=self._get_tags(), summary=self._get_summary(), description=self._get_description(), parameters=self._get_parameters(), produces=self._get_produces(), consumes=self._get_consumes(), responses=self.responses, security=self._get_security()) # TODO: SECURITY OBJECT SECURITY DEFINITIONS for key, value in list(operation.items()): # Remove empty keys if not value: operation.pop(key) return operation