json-gen-c  0.1.5
json-gen-c generate C code for json manipulation
compat_check.h File Reference

Schema compatibility checker — compares two parsed schemas and reports safe vs. breaking changes. More...

#include "utils/hash_map.h"
Include dependency graph for compat_check.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int compat_check (struct hash_map *old_structs, struct hash_map *old_enums, struct hash_map *old_oneofs, struct hash_map *new_structs, struct hash_map *new_enums, struct hash_map *new_oneofs)
 Compare two parsed schemas and print a compatibility report.
 

Detailed Description

Schema compatibility checker — compares two parsed schemas and reports safe vs. breaking changes.

Function Documentation

◆ compat_check()

int compat_check ( struct hash_map old_structs,
struct hash_map old_enums,
struct hash_map old_oneofs,
struct hash_map new_structs,
struct hash_map new_enums,
struct hash_map new_oneofs 
)

Compare two parsed schemas and print a compatibility report.

Compares structs, enums, and oneofs between the old and new schemas. Reports safe changes (additions, deprecations) and breaking changes (removals, type changes).

Parameters
old_structsHash map of old schema structs.
old_enumsHash map of old schema enums.
old_oneofsHash map of old schema oneofs.
new_structsHash map of new schema structs.
new_enumsHash map of new schema enums.
new_oneofsHash map of new schema oneofs.
Returns
0 if only safe changes, 1 if any breaking changes found.