Skip to content

KeyError: 'application/xml' in mutate_values when running on converted spec #34

@rahilmehta-dev

Description

@rahilmehta-dev

When I run AutoRestTest on my spec, the run crashes with:
KeyError: 'application/xml'

Traceback :
Traceback (most recent call last):

  File "<string>", line 1, in <module>
  File "/Volumes/MySDCard/Github/AutoRestTest/src/autoresttest/autoresttest.py", line 390, in main
    auto_rest_test.run_single(specification_name, ext)
  File "/Volumes/MySDCard/Github/AutoRestTest/src/autoresttest/autoresttest.py", line 375, in run_single
    q_learning = self.perform_q_learning(operation_graph, spec_name)
  File "/Volumes/MySDCard/Github/AutoRestTest/src/autoresttest/autoresttest.py", line 354, in perform_q_learning
    q_learning.run()
  File "/Volumes/MySDCard/Github/AutoRestTest/src/autoresttest/marl/marl.py", line 1510, in run
    self.execute_operations()
  File "/Volumes/MySDCard/Github/AutoRestTest/src/autoresttest/marl/marl.py", line 1117, in execute_operations
    ) = self.mutate_values(operation_props, parameters, body, header)
  File "/Volumes/MySDCard/Github/AutoRestTest/src/autoresttest/marl/marl.py", line 378, in mutate_values
    if body[mime] is None:
KeyError: 'application/xml'

Here are the links to the original Swagger 2.0 spec, the converted OpenAPI 3.0 spec, and the log file from the failing run (I used Swagger Editor to convert the Swagger 2.0 spec to OpenAPI): Link

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions