use std::collections::BTreeMap;
use serde::Deserialize;
use crate::{Attribute, EnumSpec, MetaSpec, ParamSpec, StringOrArray, TypeSpec};
#[derive(Deserialize, Debug)]
#[serde(rename_all = "kebab-case")]
pub struct KsySchema {
pub meta: MetaSpec,
#[serde(default)]
pub doc: Option<String>,
#[serde(default)]
pub doc_ref: Option<StringOrArray>,
#[serde(default)]
pub params: Vec<ParamSpec>,
#[serde(default)]
pub seq: Vec<Attribute>,
#[serde(default)]
pub instances: BTreeMap<String, Attribute>,
#[serde(default)]
pub types: BTreeMap<String, TypeSpec>,
#[serde(default)]
pub enums: BTreeMap<String, EnumSpec>,
}