(path)
| 109 | * @returns {Schema} schema part |
| 110 | */ |
| 111 | const getSchemaPart = (path) => { |
| 112 | const newPath = path.split("/"); |
| 113 | |
| 114 | let schemaPart = schema; |
| 115 | |
| 116 | for (let i = 1; i < newPath.length; i++) { |
| 117 | const inner = schemaPart[/** @type {keyof Schema} */ (newPath[i])]; |
| 118 | |
| 119 | if (!inner) { |
| 120 | break; |
| 121 | } |
| 122 | |
| 123 | schemaPart = inner; |
| 124 | } |
| 125 | |
| 126 | return schemaPart; |
| 127 | }; |
| 128 | |
| 129 | /** |
| 130 | * Returns description. |