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

field with the name (....) already exists in this container #39

Closed ghost closed 4 years ago

ghost commented 4 years ago
[INFO    ][fuzz_request_sender.__init__] Logger initialized
19112 [INFO] kitty: Logger initialized
Traceback (most recent call last):
  File ".\APIFuzzer.py", line 113, in <module>
    prog.run()
  File "c:\Users\IB\Downloads\PG_res\here\swagger-codegen\APIFuzzer-develop\apifuzzer\fuzzer.py", line 44, in run
    model.connect(template.compile_template())
  File "c:\Users\IB\Downloads\PG_res\here\swagger-codegen\APIFuzzer-develop\apifuzzer\base_template.py", line 43, in compile_template
    template.append_fields([Container(name=name, fields=field)])
  File "C:\Users\IB\Anaconda3\envs\api-test\lib\site-packages\kitty\model\low_level\container.py", line 65, in __init__
    self.replace_fields(fields)
  File "C:\Users\IB\Anaconda3\envs\api-test\lib\site-packages\kitty\model\low_level\container.py", line 333, in replace_fields
    self.append_fields(new_fields)
  File "C:\Users\IB\Anaconda3\envs\api-test\lib\site-packages\kitty\model\low_level\container.py", line 253, in append_fields
    self.push(field)
  File "C:\Users\IB\Anaconda3\envs\api-test\lib\site-packages\kitty\model\low_level\container.py", line 320, in push
    raise KittyException('field with the name (%s) already exists in this container' % (name))
kitty.core.KittyException: field with the name (api+v1+tender+create|post|StartDate) already exists in this container

APIFuzzer 0.9

KissPeter commented 4 years ago

Hi, Please try to reproduce the issue on the Dev branch. Also please provide the API definition to me. That could help understanding the issue and verifying the fix

ghost commented 4 years ago

That's already dev branch

ghost commented 4 years ago

json file

KissPeter commented 4 years ago

There is a StartData (also EndData) under definitions/OrderCreateResponseModel but there is another under /definitions/OrderCreateResponseModel/properties/Tender referenced definitions/TenderCreateResponseModel which caused the duplication warning. It is fixed now.