def METHOD_NAME(json_schema, *_args, **_kwargs):
	"""
	The json schema handler implements validation of JSON documents by JSON schema.
	The library of fastjsonschema implements JSON schema drafts 04, 06 and 07
	https://horejsek.github.io/python-fastjsonschema/
	Examples of use:
	@asab.web.rest.json_schema_handler({
	'type': 'object',
	'properties': {
		'key1': {'type': 'string'},
		'key2': {'type': 'number'},
	}})
	async def login(self, request, *, json_data):
		...
	or by specifying json as file
	@asab.web.rest.json_schema_handler('./data/sample_json_schema.json')
	async def login(self, request, *, json_data):
		...
	Works for `application/json`, `application/x-www-form-urlencoded` and `multipart/form-data` post requests
	"""
	def decorator(func):
		# Initializing fastjsonschema.compile method and generating
		# the validation function for validating JSON schema
		# JSON schema set as a dict
		if isinstance(json_schema, dict):
			validate = fastjsonschema.compile(json_schema)
		# JSON schema set in a file
		elif isinstance(json_schema, str):
			with open(json_schema) as f:
				schema = json.load(f)
				validate = fastjsonschema.compile(schema)
		else:
			raise ValueError(
				"JSON schema input must be type <class 'dict'> or type <class 'str'>, "
				"not type {}.".format(type(json_schema)))
		form_content_types = frozenset(['', 'application/x-www-form-urlencoded', 'multipart/form-data'])
		@functools.wraps(func)
		async def validator(*args, **kwargs):
			# Initializing fastjsonschema.compile method and generating
			# the validation function for validating JSON schema
			request = args[-1]
			if request.content_type == 'application/json':
				try:
					data = await request.json()
				except json.decoder.JSONDecodeError:
					raise aiohttp.web.HTTPBadRequest(reason="Failed to parse JSON request")
			elif request.content_type in form_content_types:
				multi_dict = await request.post()
				data = {k: v for k, v in multi_dict.items()}
			else:
				raise aiohttp.web.HTTPBadRequest(reason="Unsupported content-type {}".format(request.content_type))
			# Checking the validation on JSON data set
			try:
				validate(data)
				kwargs['json_data'] = data
			except fastjsonschema.exceptions.JsonSchemaException as e:
				raise aiohttp.web.HTTPBadRequest(reason=str(e))
			except Exception as e:
				Lex.error("JSON validation error. Reason: {}".format(e), struct_data={"path": request.path, "method": request.method})
				raise e
			return await func(*args, **kwargs)
		# This is here for Swagger documentation
		setattr(validator, "json_schema", json_schema)
		return validator
	return decorator