nlohmann / swagger_to_uml

Convert OpenAPI specifications (a.k.a. Swagger) to PlantUML diagrams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not follow html $ref

bsvedin opened this issue · comments

Path is replaced with $ref to an openapi yaml stored html.

Example:
paths:
/:
$ref: 'https://artifactory.mycompany.com/artifactory/maven/com/apis/common/0.1.0-20210924151918/common-0.1.0-20210924151918.yaml#/paths/New'
/instances:
$ref: 'https://artifactory.mycompany.com/artifactory/maven/com/apis/common/0.1.0-20210924151918/common-0.1.0-20210924151918.yaml#/paths/GetInstanceIds'

swagger_to_uml throws the following error
Traceback (most recent call last):
File "C:/Users/212708371/Documents/Gitlab/build-util/swagger_to_uml.py", line 367, in from_file
return Swagger.from_dict(loader(fd))
File "C:/Users/212708371/Documents/Gitlab/build-util/swagger_to_uml.py", line 357, in from_dict
paths = [Path.from_dict(d, path_name, path) for path_name, path in d['paths'].items()]
File "C:/Users/212708371/Documents/Gitlab/build-util/swagger_to_uml.py", line 357, in
paths = [Path.from_dict(d, path_name, path) for path_name, path in d['paths'].items()]
File "C:/Users/212708371/Documents/Gitlab/build-util/swagger_to_uml.py", line 336, in from_dict
operations=[Operation.from_dict(whole, path_name, t, op, parameters) for t, op in d.items() if t not in ['parameters', 'summary', 'description']]
File "C:/Users/212708371/Documents/Gitlab/build-util/swagger_to_uml.py", line 336, in
operations=[Operation.from_dict(whole, path_name, t, op, parameters) for t, op in d.items() if t not in ['parameters', 'summary', 'description']]
File "C:/Users/212708371/Documents/Gitlab/build-util/swagger_to_uml.py", line 286, in from_dict
summary=d.get('summary'),

I am assuming that it would also throw errors for my Parameters and Schemas which also reference html but it fails before getting to those