Skip to content

0.4.22

Compare
Choose a tag to compare
@amarzavery amarzavery released this 12 Dec 02:45
· 341 commits to master since this release
67f286b
  • Added support to generate class diagram from a given swagger spec #188.
D:\>oav generate-uml -h
oav generate-uml <spec-path>

Options:
  --version                Show version number                         [boolean]
  -l, --logLevel           Set the logging level for console.
  [choices: "off", "json", "error", "warn", "info", "verbose", "debug", "silly"]
                                                               [default: "warn"]
  -f, --logFilepath        Set the log file path. It must be an absolute
                           filepath. By default the logs will stored in a
                           timestamp based log file at
                           "C:\Users\amzavery\oav_output".
  -d, --outputDir          Output directory where the class diagram will be
                           stored.                      [string] [default: "./"]
  -p, --disableProperties  Should model properties not be generated?
                                                      [boolean] [default: false]
  -a, --disableAllof       Should allOf references not be generated?
                                                      [boolean] [default: false]
  -r, --disableRefs        Should model references not be generated?
                                                      [boolean] [default: false]
  -i, --direction          The direction of the generated diagram:
                           "TB" - TopToBottom (default),
                           "LR" - "LeftToRight",
                           "RL" - "RightToLeft"
                            [string] [choices: "TB", "LR", "RL"] [default: "TB"]
  -h, --help               Show help                                   [boolean]

Please open the generated svg in a browser of your choice.

Examples

  1. Generating a full class diagram that contains property definition, allOf references and model references
oav generate-uml <spec-path>
  1. Generating a class diagram that contains only allOf references between models. Helpful for understanding the inheritance relationship.
oav generate-uml -pr <spec-path>
  1. Generating a class diagram that contains only references between models. Helpful for understanding the association between models.
oav generate-uml -pa <spec-path>

NOTE: For better visualization you can specify the direction in which the uml should be generated. TopBottom "TB" is the default. Other values are "LR" and "RL".