* Validates that the parsed object has the basic structure of an OpenAPI spec * @param spec - The parsed spec object * @returns true if the spec has the basic required structure
(spec: unknown)
| 210 | * @returns true if the spec has the basic required structure |
| 211 | */ |
| 212 | private isValidSpecObject(spec: unknown): spec is OpenAPIV3.Document { |
| 213 | return ( |
| 214 | typeof spec === "object" && |
| 215 | spec !== null && |
| 216 | "info" in spec && |
| 217 | typeof spec.info === "object" && |
| 218 | spec.info !== null |
| 219 | ); |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * Extracts the spec ID from the spec object |