Function
resolveRef
(
ref: string,
root: JsonSchemaLike,
)
Source from the content-addressed store, hash-verified
| 79 | } |
| 80 | |
| 81 | function resolveRef( |
| 82 | ref: string, |
| 83 | root: JsonSchemaLike, |
| 84 | ): JsonSchemaLike | undefined { |
| 85 | const match = ref.match(/^#\/(\$defs|definitions)\/(.+)$/) |
| 86 | if (!match) return undefined |
| 87 | const bucket = match[1] as '$defs' | 'definitions' |
| 88 | const key = match[2] |
| 89 | return key === undefined ? undefined : root[bucket]?.[key] |
| 90 | } |
| 91 | |
| 92 | function findSecretParams( |
| 93 | schema: JsonSchemaLike | undefined, |
Tested by
no test coverage detected