(schema)
| 7 | // HTTP verb and requestPath attached as properties |
| 8 | |
| 9 | export default async function getOperations(schema) { |
| 10 | const operations = [] |
| 11 | |
| 12 | for (const [requestPath, operationsAtPath] of Object.entries(schema.paths)) { |
| 13 | for (const [verb, operationProps] of Object.entries(operationsAtPath)) { |
| 14 | const operation = new Operation(verb, requestPath, operationProps, schema.servers) |
| 15 | operations.push(operation) |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | return operations |
| 20 | } |
| 21 | |
| 22 | export async function getWebhooks(schema) { |
| 23 | // In OpenAPI version 3.1, the schema data is under the `webhooks` key, but |
no outgoing calls
no test coverage detected