blob: d993781e8d1ed5991f44a1c2ac4f1ad6504e3422 [file] [log] [blame]
module example-schema {
prefix aha;
namespace "http://example.com";
leaf leafUInt8 {
type uint8;
}
leaf leafUInt16 {
type uint16;
}
leaf leafUInt32 {
type uint32;
}
leaf leafUInt64 {
type uint64;
}
leaf leafInt8 {
type int8;
}
leaf leafInt16 {
type int16;
}
leaf leafInt32 {
type int32;
}
leaf leafInt64 {
type int64;
}
leaf leafString {
type string;
}
leaf leafEnum {
type enumeration {
enum lol;
enum data;
enum coze;
}
}
leaf leafDecimal {
type decimal64 {
fraction-digits 9;
}
}
container pContainer {
presence true;
}
list person {
key 'name';
leaf name {
type string;
}
}
leaf bossPerson {
type leafref {
path '../aha:person/name';
}
}
grouping upAndDown {
leaf up {
type boolean;
}
leaf down {
type boolean;
}
}
uses upAndDown;
container lol {
uses upAndDown;
}
grouping targets_def {
list targets {
key 'city';
leaf city {
type string;
}
}
}
rpc launch-nukes {
input {
container payload {
leaf kilotons {
type uint64;
mandatory true;
units "kilotons";
}
}
leaf description {
type string;
}
container cities {
presence true;
uses targets_def;
}
}
output {
leaf blast-radius {
type uint32;
units "m";
}
leaf actual-yield {
type uint64;
units "kilotons";
}
container damaged-places {
presence true;
uses targets_def;
}
}
}
rpc noop {}
}