davidmoten / openapi-to-plantuml

Converts OpenAPI 3.0 definitions to Plant UML text for visualisation of your API.
Apache License 2.0
92 stars 18 forks source link

External references json #188

Closed ubu2020user closed 8 months ago

ubu2020user commented 8 months ago

Hey David, I implemented a Json External Reference Merger. It is pretty simple.

  1. It searches for external refs in Jsons via "../", "./", or "C:"
  2. Locates the file
  3. Inserts it's schemas into the original Json
  4. Redo as long as external refs are in it

This operation will be used if you use the flag --combineExternalReferences (java -jar .\openapi-to-plantuml.jar --combineExternalReferences)

The methods of the inserted json are not used => Maybe onto the roadmap, as well as yaml? Maybe you can make everything a little bit more neat and beautify it 👍

Thank you for your work btw. :) See you around and maybe we exchange further :p

davidmoten commented 8 months ago

Oh, good effort! The bad news is that all we should have to do is OpenAPIParser.setResolve(true). Already working in openapi-codegen: https://github.com/davidmoten/openapi-codegen/blob/eed88f1d32e1574630b1ba7e2a2fd96c4d741aef/openapi-codegen-generator/src/main/java/org/davidmoten/oa3/codegen/generator/Names.java#L64C9-L69