Lines Matching +full:generate +full:- +full:schema
2 """Generate library/psa_crypto_driver_wrappers.h
5 This module is invoked by the build scripts to auto generate the
10 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
40 def render(template_path: str, driver_jsoncontext: list) -> str:
54 driver_jsoncontext: list) -> None:
56 Generate the file psa_crypto_driver_wrapper.c.
65 encoding='UTF-8') as out_file:
69 def validate_json(driverjson_data: Driver, driverschema_list: dict) -> None:
71 Validate the Driver JSON against an appropriate schema
72 the schema passed could be that matching an opaque/ transparent driver.
78 jsonschema.validate(instance=driverjson_data, schema=_schema)
80 # This could happen if the driverjson_data.type does not exist in the provided schema list
91 print("Error: Failed to validate data file: {} using schema: {}."
94 print("Error: Failed to validate data file: {} using schema: {}."
100 def load_driver(schemas: Dict[str, Any], driver_file: str) -> Any:
102 with open(file=driver_file, mode='r', encoding='UTF-8') as f:
111 def load_schemas(mbedtls_root: str) -> Dict[str, Any]:
129 with open(file=file_path, mode='r', encoding='UTF-8') as file:
136 jsondriver_list: str) -> list:
144 encoding='UTF-8') as driver_list_file:
152 def trace_exception(e: Exception, file=sys.stderr) -> None:
162 def main() -> int:
169 parser.add_argument('--mbedtls-root', default=def_arg_mbedtls_root,
171 parser.add_argument('--template-dir',
173 parser.add_argument('--json-dir',