openapi-datamodel
v1.0.2
Published
This CLI tool visualizes the schemas described in an OpenAPI Specification. It borrows some of the UML Class Diagram notations.
Downloads
2
Readme
This CLI tool visualizes the schemas described in an OpenAPI Specification. It borrows some of the UML Class Diagram notations.
The white classes are describing the data structures of data apearing in the response payloads of the the API. The light yellow classes describe the data structures of the data sent through the reponse body of a specific API operation.
The light blue classes are describing the concepts appearing in both request and response bodies. In some cases, the same concept can appear in both the send and receieved data, however with different properties. In this example, the aggregations
concept appear in both written and read data. However the written one does't have any propoerties of primitive data type.
The arrows shapes distinguish the different relationships between the datamodel's concepts.
To install:
npm i openapi-datamodel -g
CLI Options:
Options:
-V, --version output the version number
-i, --input <input> input file
-o, --output <output> output file
-d, --details show details
-res, --responses show only responses dm
-req, --requests show only requests dm
-m, --merge merge requests and responses
-h, --help display help for command
example:
- To generate a plantUML visualization of the whole datamodel:
rdm -i https://raw.githubusercontent.com/boscore/ibc_plugin_eos/aa7fcb10d07593891ae8f50871dd31decf79d1ba/plugins/chain_api_plugin/chain.swagger.yaml -o output.puml
- To generate a plantUML visualization of the part of datamodel representing the data that is sent in the request bodies of the operations, use the
-req
option :
rdm -i https://raw.githubusercontent.com/boscore/ibc_plugin_eos/aa7fcb10d07593891ae8f50871dd31decf79d1ba/plugins/chain_api_plugin/chain.swagger.yaml -o output.puml -req
- To generate a plantUML visualization of the part of datamodel representing the data that is sent back to the client in the responses, use the
-res
option :
rdm -i https://raw.githubusercontent.com/boscore/ibc_plugin_eos/aa7fcb10d07593891ae8f50871dd31decf79d1ba/plugins/chain_api_plugin/chain.swagger.yaml -o output.puml -res