Merge pull request #745 from aviskase/main

OpenAPI import - filter out non-methods on path item objects parsing
This commit is contained in:
Anoop M D 2023-10-24 03:50:53 +05:30 committed by GitHub
commit 1026addc8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,7 +326,11 @@ const parseOpenApiCollection = (data) => {
let allRequests = Object.entries(collectionData.paths) let allRequests = Object.entries(collectionData.paths)
.map(([path, methods]) => { .map(([path, methods]) => {
return Object.entries(methods).map(([method, operationObject]) => { return Object.entries(methods)
.filter(([method, op]) => {
['get', 'put', 'post', 'delete', 'options', 'head', 'patch', 'trace'].includes(method.toLowerCase());
})
.map(([method, operationObject]) => {
return { return {
method: method, method: method,
path: path, path: path,