(schema: ObjectSchema, params: string[])
| 141 | * @internal |
| 142 | */ |
| 143 | export function checkParamsSchema(schema: ObjectSchema, params: string[]): boolean { |
| 144 | const properties = Object.keys(schema.properties ?? {}) |
| 145 | const required = schema.required ?? [] |
| 146 | |
| 147 | if (properties.length !== params.length || properties.some(v => !params.includes(v))) { |
| 148 | return false |
| 149 | } |
| 150 | |
| 151 | if (required.length !== params.length || required.some(v => !params.includes(v))) { |
| 152 | return false |
| 153 | } |
| 154 | |
| 155 | return true |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * @internal |
no outgoing calls
no test coverage detected