https://github.com/hal/dmr.cmd
Small DMR related command line tool
https://github.com/hal/dmr.cmd
Last synced: over 1 year ago
JSON representation
Small DMR related command line tool
- Host: GitHub
- URL: https://github.com/hal/dmr.cmd
- Owner: hal
- License: apache-2.0
- Created: 2015-10-22T13:17:02.000Z (over 10 years ago)
- Default Branch: main
- Last Pushed: 2023-04-23T12:04:48.000Z (about 3 years ago)
- Last Synced: 2025-01-07T05:48:43.887Z (over 1 year ago)
- Language: Java
- Size: 8.79 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DMR Command Line Tool
Small DMR related tool which reads a DMR encoded file from stdin and prints the base64 encoded version to stdout. Used by HAL to consume arbitrary resource descriptions. Since the DMR parsing is not available in HAL (due to GWT restrictions) only base64 encoded resource descriptions can be used.
Say you have a file `endpoint.dmr`
```
{
"description" => "A definition of a management endpoint.",
"attributes" => {
"name" => {
"type" => STRING,
"description" => "The name of the management endpoint",
"nillable" => false
},
"scheme" => {
"type" => STRING,
"description" => "The scheme of management endpoint. Allowed values are \"http\" and \"https\".",
"nillable" => false,
"allowed" => [
"http",
"https"
]
},
"host-name" => {
"type" => STRING,
"description" => "The hostname of the management endpoint",
"nillable" => false
},
"port" => {
"type" => INT,
"description" => "The port of the management endpoint. Leave empty for the default ports.",
"nillable" => true,
"min" => 1L,
"max" => 65535L
}
}
}
```
you can save the base64 encoded version by running
```bash
java -jar target/dmr-cmd-0.0.1.jar < endpoint.dmr > endpoint.base64
```