(schema_a, schema_b)
| 966 | |
| 967 | |
| 968 | def get_schema_diff(schema_a, schema_b): |
| 969 | # Assuming f_schema and linked_function['json_schema'] are your JSON schemas |
| 970 | f_schema_json = json_dumps(schema_a) |
| 971 | linked_function_json = json_dumps(schema_b) |
| 972 | |
| 973 | # Compute the difference using difflib |
| 974 | difference = list(difflib.ndiff(f_schema_json.splitlines(keepends=True), linked_function_json.splitlines(keepends=True))) |
| 975 | |
| 976 | # Filter out lines that don't represent changes |
| 977 | difference = [line for line in difference if line.startswith("+ ") or line.startswith("- ")] |
| 978 | |
| 979 | return "".join(difference) |
| 980 | |
| 981 | |
| 982 | def create_uuid_from_string(val: str): |
nothing calls this directly
no test coverage detected