-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger Parser Issues #9
Comments
Thanks for reaching out. Thanks |
I got this same error as well, and i can't seem to find any .yaml |
I also get this. Here's the yaml file I am using: swagger: '2.0'
contact:
|
Getting the same error. How did fix this? |
I got same error, but I was fix with this converter: https://editor.swagger.io/
'swagger: [version]' because my problem the first line is not swagger but 'openfile:[version]' |
I am getting the same issue even after I added the first line as swagger: 3.0.1 |
@AnjiB and all, the parser currently supports only Swagger 2. |
@thenorthernpole Maybe it could be worth spending 2 mins to add this valuable information in the README, just to help people to avoid wasting time to download, compile and run the tool on an unsupported OpenAPI specification. |
I am always getting this error on runwhich i assume it has something to do with outdated parser?
Can you fix this?
0:36:05.376 [main] ERROR c.i.a.tests.ScenariosDataProvider - Failed to get httpRequestList, for file: site_staging.yaml
java.lang.NullPointerException: null
at com.imperva.apispecparser.parsers.swagger.Swagger2Parser.getEndpointModelList(Swagger2Parser.java:52)
at com.imperva.apiattacktool.tests.AbstractTestDriver.parseSwagger(AbstractTestDriver.java:85)
at com.imperva.apiattacktool.tests.SingleValueScenarioTestDriver.getHttpRequestList(SingleValueScenarioTestDriver.java:36)
at com.imperva.apiattacktool.tests.ScenariosDataProvider.getEndpointTestRequestData(ScenariosDataProvider.java:57)
at com.imperva.apiattacktool.tests.ScenariosDataProvider.positiveScenarioDataProvider(ScenariosDataProvider.java:30)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:77)
at org.testng.internal.MethodInvocationHelper.invokeMethodNoCheckedException(MethodInvocationHelper.java:46)
at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:146)
at org.testng.internal.Parameters.handleParameters(Parameters.java:820)
at org.testng.internal.Parameters.handleParameters(Parameters.java:762)
at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:60)
at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:39)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:771)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.testng.TestRunner.privateRun(TestRunner.java:770)
at org.testng.TestRunner.run(TestRunner.java:591)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)
at org.testng.SuiteRunner.run(SuiteRunner.java:304)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)
at org.testng.TestNG.runSuites(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:1000)
at com.imperva.apiattacktool.cli.ApiAttackTool.call(ApiAttackTool.java:87)
at com.imperva.apiattacktool.cli.ApiAttackTool.call(ApiAttackTool.java:13)
at picocli.CommandLine.executeUserObject(CommandLine.java:1781)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2139)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2106)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1973)
at picocli.CommandLine.execute(CommandLine.java:1902)
at com.imperva.apiattacktool.ToolMain.main(ToolMain.java:17)
[Utils] [ERROR] [Error] org.testng.TestNGException:
Data Provider public static java.lang.Object[][] com.imperva.apiattacktool.tests.ScenariosDataProvider.positiveScenarioDataProvider() returned a null value
at org.testng.internal.MethodInvocationHelper.invokeDataProvider(MethodInvocationHelper.java:148)
at org.testng.internal.Parameters.handleParameters(Parameters.java:820)
at org.testng.internal.Parameters.handleParameters(Parameters.java:762)
at org.testng.internal.ParameterHandler.handleParameters(ParameterHandler.java:60)
at org.testng.internal.ParameterHandler.createParameters(ParameterHandler.java:39)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:771)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.testng.TestRunner.privateRun(TestRunner.java:770)
at org.testng.TestRunner.run(TestRunner.java:591)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)
at org.testng.SuiteRunner.run(SuiteRunner.java:304)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)
at org.testng.TestNG.runSuites(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:1000)
at com.imperva.apiattacktool.cli.ApiAttackTool.call(ApiAttackTool.java:87)
at com.imperva.apiattacktool.cli.ApiAttackTool.call(ApiAttackTool.java:13)
at picocli.CommandLine.executeUserObject(CommandLine.java:1781)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2139)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2106)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1973)
at picocli.CommandLine.execute(CommandLine.java:1902)
at com.imperva.apiattacktool.ToolMain.main(ToolMain.java:17)
The text was updated successfully, but these errors were encountered: