Added
- New unit tests to ensure the reliability of schema dereferencing functions in
fireboltOpenRpcDereferencing.mjs
.
Changed
-
Refined
selfReferenceSchemaCheck()
to return a boolean consistently, enhancing readability and predictability of self-referencing detection logic. -
Overhauled
replaceRefs()
for improved efficiency:-
Implemented a set to track replaced $refs, thereby preventing infinite recursion during ref replacement.
-
Expanded the function to handle nested objects and arrays more effectively.
-
-
Modernized various parts of
fireboltOpenRpcDereferencing.mjs
with arrow functions for a more modern code syntax.
Fixed
- Addressed potential issues with recursive calls and infinite loops in
replaceRefs()
by marking self-referenced schemas as replaced and removing redundant $ref keys.