39 releases (8 breaking)

✓ Uses Rust 2018 edition

0.10.6 Feb 7, 2019
0.9.2 Jan 30, 2019
0.6.4 Dec 20, 2018
0.2.7 Nov 28, 2018

#26 in Configuration

Download history 1/week @ 2019-04-23 2/week @ 2019-04-30 39/week @ 2019-05-07 91/week @ 2019-05-14 86/week @ 2019-05-21 106/week @ 2019-05-28 78/week @ 2019-06-04 76/week @ 2019-06-11 117/week @ 2019-06-18 465/week @ 2019-06-25 39/week @ 2019-07-02 194/week @ 2019-07-09 39/week @ 2019-07-16 61/week @ 2019-07-30

226 downloads per month

Apache-2.0

75KB
2K SLoC

balena-cdsl

Obsolete

This package is obsolete now. balena-cdsl project was renamed to jellyschema.


lib.rs:

balena configuration dsl

A crate that provides facilities to:

  • transform configuration DSL into the JSON Schema & UI Object Schema with custom extensions
  • parse configuration DSL

Obsolete

This crate is obsolete now. balena-cdsl crate was renamed to jellyschema and the balena-cdsl won't receive any updates.

Versioning

This crate is being actively developed and it does NOT follow Semantic Versioning yet. It will follow semantic versioning when it reaches version 1.0.

MINOR version changes denotes incompatible API changes and PATCH version changes denotes both new functionality in a backwards-compatible manner and backwards-compatible bug fixes.

Examples

Generate JSON Schema & UI Object

use balena_cdsl::output::generator::Generator;
use serde_yaml::*;

let dsl = r#"
  version: 1
  properties:
    - name:
        type: string
        help: You should type your name here
"#;

let input_schema: serde_yaml::Value = serde_yaml::from_str(dsl).unwrap();

let (json_schema, ui_object) = Generator::with(input_schema).unwrap().generate();

Dependencies

~5MB
~106K SLoC