(ref: string, root: JsonSchema)
| 53 | // --------------------------------------------------------------------------- |
| 54 | |
| 55 | const resolveRef = (ref: string, root: JsonSchema): JsonSchema | null => { |
| 56 | const name = ref.match(/^#\/\$defs\/(.+)$/)?.[1]; |
| 57 | if (!name || !root.$defs) return null; |
| 58 | return root.$defs[name] ?? null; |
| 59 | }; |
| 60 | |
| 61 | const getRefName = (ref: string): string | undefined => ref.match(/^#\/\$defs\/(.+)$/)?.[1]; |
| 62 |
no outgoing calls
no test coverage detected