The orientdb console has an export schema command, it creates something like:
... "schema":{ "version":54, "classes":[ { "name":"YourClassName", "default-cluster-id":9, "cluster-ids":[ 9 ], "properties":[ { "name":"f1", "type":"STRING" }, { "name":"f2", "type":"STRING" }, { "name":"f3", "type":"STRING" } ] }, ...
The result is json, so you can write a script to convert it to what you need.
source share