mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-02 22:39:42 +08:00
feat: add json schema validation for api
This commit is contained in:
@@ -2,6 +2,7 @@ import importlib
|
||||
import os
|
||||
|
||||
from httprunner import exceptions, logger, utils
|
||||
from httprunner.loader.check import JsonSchemaCheck
|
||||
from httprunner.loader.load import load_module_functions, load_file, load_dot_env_file, \
|
||||
load_folder_files
|
||||
from httprunner.loader.locate import init_project_working_directory, get_project_working_directory
|
||||
@@ -356,7 +357,7 @@ def load_test_file(path):
|
||||
|
||||
elif "request" in raw_content:
|
||||
# file_type: api
|
||||
# TODO: add json schema validation for api
|
||||
JsonSchemaCheck.check_api_format(raw_content)
|
||||
loaded_content = raw_content
|
||||
loaded_content["path"] = path
|
||||
loaded_content["type"] = "api"
|
||||
|
||||
Reference in New Issue
Block a user