KissPeter / APIFuzzer

Fuzz test your application using your OpenAPI or Swagger API definition without coding
GNU General Public License v3.0
416 stars 65 forks source link

read YAML api specifications #30

Closed adamdecaf closed 4 years ago

adamdecaf commented 4 years ago

I was trying to load a YAML OpenAPI file, but ran into a problem where it can only read a JSON file.

Source: https://github.com/KissPeter/APIFuzzer/blob/master/fuzzer.py#L118

$ python3 fuzzer.py -s ../../moov-io/paygate/openapi.yaml -u http://127.0.0.1:8082/ -r ./reports/ --log debug --headers '[{"x-user-id": "adam"}]'
Failed to parse input file: Expecting value: line 1 column 1 (char 0)

I can submit a PR to try and read YAML and JSON. Thoughts?

KissPeter commented 4 years ago

Hi, YAML is currently not supported but it is on the roadmap among other useful stuff. The inner side of the application is designed to work with Python dict therefore my plan is to detect the file type when the API description file is read and load according to the detection. What makes it more complicated if you have API definition splitted into multiple files... Any PR is welcome.

KissPeter commented 4 years ago

Function implemented

adamdecaf commented 4 years ago

Thanks!