You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`python swagger_to_uml.py swagger.json > swagger.puml
required key "type" not found in dictionary {"description": "A representation of a cat", "allOf": [{"$ref": "#/definitions/Pet"}, {"type": "object", "properties": {"huntingSkill": {"type": "string", "description": "The measured skill for hunting", "default": "lazy", "enum": ["clueless", "lazy", "adventurous", "aggressive"]}}, "required": ["huntingSkill"]}]}
Traceback (most recent call last):
File "swagger_to_uml.py", line 380, in
sw = Swagger.from_file(input_file_name)
File "swagger_to_uml.py", line 367, in from_file
return Swagger.from_dict(loader(fd))
File "swagger_to_uml.py", line 357, in from_dict
definitions = [Definition.from_dict(name, definition) for name, definition in d.get('definitions',{}).items()]
File "swagger_to_uml.py", line 357, in
definitions = [Definition.from_dict(name, definition) for name, definition in d.get('definitions',{}).items()]
File "swagger_to_uml.py", line 204, in from_dict
type=d['type'],
KeyError: 'type'
Extended Pet example to include Cat and Dog using allOf example from here: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md
Get the following error:
`python swagger_to_uml.py swagger.json > swagger.puml
required key "type" not found in dictionary {"description": "A representation of a cat", "allOf": [{"$ref": "#/definitions/Pet"}, {"type": "object", "properties": {"huntingSkill": {"type": "string", "description": "The measured skill for hunting", "default": "lazy", "enum": ["clueless", "lazy", "adventurous", "aggressive"]}}, "required": ["huntingSkill"]}]}
Traceback (most recent call last):
File "swagger_to_uml.py", line 380, in
sw = Swagger.from_file(input_file_name)
File "swagger_to_uml.py", line 367, in from_file
return Swagger.from_dict(loader(fd))
File "swagger_to_uml.py", line 357, in from_dict
definitions = [Definition.from_dict(name, definition) for name, definition in d.get('definitions',{}).items()]
File "swagger_to_uml.py", line 357, in
definitions = [Definition.from_dict(name, definition) for name, definition in d.get('definitions',{}).items()]
File "swagger_to_uml.py", line 204, in from_dict
type=d['type'],
KeyError: 'type'
Modified swagger attached
swagger.json.txt
The text was updated successfully, but these errors were encountered: