Closed qarmin closed 4 months ago
When creating minimal file I got
java.lang.IllegalArgumentException: Scheme is not declared: ReportRequestQuery
at com.endava.cats.factory.FuzzingDataFactory.generateSample(FuzzingDataFactory.java:426)
at com.endava.cats.factory.FuzzingDataFactory.getRequestPayloadsSamples(FuzzingDataFactory.java:410)
at com.endava.cats.factory.FuzzingDataFactory.getFuzzDataForHttpMethod(FuzzingDataFactory.java:231)
at com.endava.cats.factory.FuzzingDataFactory.getFuzzDataForPost(FuzzingDataFactory.java:172)
at com.endava.cats.factory.FuzzingDataFactory.fromPathItem(FuzzingDataFactory.java:98)
at com.endava.cats.factory.FuzzingDataFactory_ClientProxy.fromPathItem(Unknown Source)
at com.endava.cats.command.CatsCommand.fuzzPath(CatsCommand.java:346)
at com.endava.cats.command.CatsCommand.startFuzzing(CatsCommand.java:286)
at com.endava.cats.command.CatsCommand.doLogic(CatsCommand.java:226)
at com.endava.cats.command.CatsCommand.run(CatsCommand.java:177)
at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at com.endava.cats.CatsMain.run(CatsMain.java:42)
at com.endava.cats.CatsMain_ClientProxy.run(Unknown Source)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:132)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
is this expected? Openapi json
{"openapi":"3.0.3","info":{"title":"ff","description":"fffffff","license":{"name":""},"version":"1.1.0"},"paths":{"/rest/1/pdf/":{"post":{"tags":["crate::pdf_creator::routes"],"operationId":"create_pdf","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequestQuery"}}},"required":true},"responses":{"200":{"description":"Create PDF","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Category":{"type":"string","enum":["STATIC","KINETIC"]}}}}
Looks that this file causes this
{"openapi":"3.0.3","info":{"title":"fasf","description":"ASFAFSAF","license":{"name":""},"version":"1.1.0"},"paths":{"/rest/1/pdf/":{"post":{"tags":["crate::pdf_creator::routes"],"operationId":"create_pdf","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequestQuery2"}}},"required":true},"responses":{"200":{"description":"Create PDF","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Category":{"type":"string","enum":["STATIC","KINETIC"]},"ReportRequestQuery2":{"type":"object","required":["report_type","report_uuid","language","data"],"properties":{"data":{"$ref":"#/components/schemas/ReportData2"},"language":{"$ref":"#/components/schemas/Languages"},"report_type":{"$ref":"#/components/schemas/ReportSymbol"},"report_uuid":{"type":"string"}}}}}}
@qarmin Thank you for raising this. I'll take a look to see what's happening.
This is fixed now and will be available in next release.
Fix is available in latest release: https://github.com/Endava/cats/releases/tag/cats-11.0.0
Describe the bug When fuzzing with command
after ~15 endpoints, program showed this error and stopped to work
Sadly I cannot provide openapi file because is private, but will try minimize it and publish
Environment: