Strips/rewrites JSON Schema keywords that strict-mode function-calling parsers (e.g. OpenAI)
reject or mishandle: type: 'file' isn't valid JSON Schema, default/example/pattern/
min*/max* keywords commonly trip strict validators, and explicit null values are rejected
outright. Recurses into properties, items, and oneOf/anyOf/allOf branches, with a
cycle guard for specs where SwaggerParser.dereference() has produced a genuinely
self-referential schema object (a real object cycle, not just a repeated $ref string).
Strips/rewrites JSON Schema keywords that strict-mode function-calling parsers (e.g. OpenAI) reject or mishandle:
type: 'file'isn't valid JSON Schema,default/example/pattern/min*/max*keywords commonly trip strict validators, and explicitnullvalues are rejected outright. Recurses intoproperties,items, andoneOf/anyOf/allOfbranches, with a cycle guard for specs where SwaggerParser.dereference() has produced a genuinely self-referential schema object (a real object cycle, not just a repeated$refstring).